summaryrefslogtreecommitdiff
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-03 21:02:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-03 21:02:32 +0200
commit27744fe439c59182e608c381928817d64bb21d96 (patch)
tree62b70361f060197a5f8fc961cea0877c0df443d5 /libavcodec/h263dec.c
parentaf58a77f0a9760c97c736bb54ae2884dcf73cf4f (diff)
parent1d4a01474d54a4d3bb59dc94d285334f7bcbd889 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: mpeg12: fixed parsing in some mpeg2 streams Add SMPTE240M transfer characteristics flag. mpegts: Some additional HDMV types and reg descriptors for mpegts motionpixels: Clip YUV values after applying a gradient. jpeg: handle progressive in second field of interlaced. ituh263dec: Implement enough of Annex O (scalability) to fix a FPE. h263: more strictly forbid frame size changes with frame-mt. h264: additional protection against unsupported size/bitdepth changes. tta: prevents overflows for 32bit integers in header. configure: remove malloc_aligned. vp8: update frame size changes on thread context switches. snowdsp: explicitily state instruction size. wmall: fix reconstructing audio with uncoded channels WMAL cosmetics: fix indentation gitignore: add Win32 library suffixes Conflicts: configure libavcodec/h263dec.c libavcodec/h264.c libavcodec/ituh263dec.c libavcodec/mjpegdec.c libavcodec/wmalosslessdec.c libavcodec/x86/snowdsp_mmx.c libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 4e8ff5d6bf..3967ff2865 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -452,6 +452,15 @@ retry:
if (ret < 0){
av_log(s->avctx, AV_LOG_ERROR, "header damaged\n");
return -1;
+ } else if ((s->width != avctx->coded_width ||
+ s->height != avctx->coded_height ||
+ (s->width + 15) >> 4 != s->mb_width ||
+ (s->height + 15) >> 4 != s->mb_height) &&
+ (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME))) {
+ av_log_missing_feature(s->avctx, "Width/height/bit depth/chroma idc changing with threads is", 0);
+ s->width = avctx->coded_width;
+ s->height= avctx->coded_height;
+ return AVERROR_PATCHWELCOME; // width / height changed during parallelized decoding
}
avctx->has_b_frames= !s->low_delay;
@@ -592,13 +601,6 @@ retry:
/* H.263 could change picture size any time */
ParseContext pc= s->parse_context; //FIXME move these demuxng hack to avformat
- if (HAVE_THREADS && (s->avctx->active_thread_type&FF_THREAD_FRAME)) {
- av_log_missing_feature(s->avctx, "Width/height/bit depth/chroma idc changing with threads is", 0);
- s->width = avctx->coded_width;
- s->height= avctx->coded_height;
- return -1; // width / height changed during parallelized decoding
- }
-
s->parse_context.buffer=0;
ff_MPV_common_end(s);
s->parse_context= pc;