On 10/27/2013 06:10 AM, Anton Khirnov wrote:
---
libavcodec/h261dec.c | 5 ++++-
libavcodec/h263dec.c | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index f88831f..10489e1 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -29,6 +29,7 @@
#include "mpegvideo.h"
#include "h263.h"
#include "h261.h"
+#include "internal.h"
#define H261_MBA_VLC_BITS 9
#define H261_MTYPE_VLC_BITS 6
@@ -608,7 +609,9 @@ retry:
s->parse_context = pc;
}
if (!s->context_initialized) {
- avcodec_set_dimensions(avctx, s->width, s->height);
+ ret = ff_set_dimensions(avctx, s->width, s->height);
+ if (ret < 0)
+ return ret;
goto retry;
}
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 6245068..503f8ea 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -590,7 +590,9 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame,
/* H.263 could change picture size any time */
s->context_reinit = 0;
- avcodec_set_dimensions(avctx, s->width, s->height);
+ ret = ff_set_dimensions(avctx, s->width, s->height);
+ if (ret < 0)
+ return ret;
if ((ret = ff_MPV_common_frame_size_change(s)))
return ret;
Ok
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel