summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rawvideodec.c3
-rw-r--r--libavformat/yuv4mpegdec.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c
index 5f372c9a2c..c7de844765 100644
--- a/libavformat/rawvideodec.c
+++ b/libavformat/rawvideodec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/imgutils.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
@@ -85,7 +86,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
width = st->codec->width;
height = st->codec->height;
- packet_size = avpicture_get_size(st->codec->pix_fmt, width, height);
+ packet_size = av_image_get_buffer_size(st->codec->pix_fmt, width, height, 1);
if (packet_size < 0)
return -1;
diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c
index dd81358608..0805274144 100644
--- a/libavformat/yuv4mpegdec.c
+++ b/libavformat/yuv4mpegdec.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/imgutils.h"
+
#include "avformat.h"
#include "internal.h"
#include "yuv4mpeg.h"
@@ -226,7 +228,8 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt)
width = st->codec->width;
height = st->codec->height;
- packet_size = avpicture_get_size(st->codec->pix_fmt, width, height);
+ packet_size = av_image_get_buffer_size(st->codec->pix_fmt,
+ width, height, 1);
if (packet_size < 0)
return packet_size;