diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-20 03:20:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-20 03:20:29 +0200 |
commit | 61ced71d79ebef22f8ab6ee3511a7a989f6fd3ac (patch) | |
tree | 6000ca917b87276d4e29b6ff5ca4fb7d0fee5b30 /libavcodec/h263dec.c | |
parent | d57ca5e5a8ba993630c87fbc87ed1f8267309278 (diff) | |
parent | 581281e242609a222233a2e5538b89dfb88fb18e (diff) | |
download | ffmpeg-streaming-61ced71d79ebef22f8ab6ee3511a7a989f6fd3ac.zip ffmpeg-streaming-61ced71d79ebef22f8ab6ee3511a7a989f6fd3ac.tar.gz |
Merge commit '581281e242609a222233a2e5538b89dfb88fb18e'
* commit '581281e242609a222233a2e5538b89dfb88fb18e':
matroskadec: check realloc in lzo encoding
matroska: honor error_recognition on unknown doctypes
tiffdec: Add support for GRAY16LE.
tiffenc: Add support for little endian RGB48 and GRAY16
mpeg4: support frame parameter changes with frame-mt
mpegvideo: check ff_find_unused_picture() return value for errors
mpegvideo: release frame buffers before freeing them
configure: msvc: default to 'lib' as 'ar' tool
build: support some non-standard ar variants
Conflicts:
libavcodec/h263dec.c
libavcodec/mpegvideo.c
libavcodec/tiff.c
libavcodec/tiffenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 6f7eede..0b85157 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -462,15 +462,6 @@ retry: if (ret < 0){ av_log(s->avctx, AV_LOG_ERROR, "header damaged\n"); return ret; - } 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; @@ -607,21 +598,29 @@ retry: /* FIXME: By the way H263 decoder is evolving it should have */ /* an H263EncContext */ - if ( s->width != avctx->coded_width - || s->height != avctx->coded_height) { - /* H.263 could change picture size any time */ + if (!avctx->coded_width || !avctx->coded_height) { ParseContext pc= s->parse_context; //FIXME move these demuxng hack to avformat s->parse_context.buffer=0; ff_MPV_common_end(s); s->parse_context= pc; - } - if (!s->context_initialized) { avcodec_set_dimensions(avctx, s->width, s->height); goto retry; } + if (s->width != avctx->coded_width || + s->height != avctx->coded_height || + s->context_reinit) { + /* H.263 could change picture size any time */ + s->context_reinit = 0; + + avcodec_set_dimensions(avctx, s->width, s->height); + + if ((ret = ff_MPV_common_frame_size_change(s))) + return ret; + } + if((s->codec_id==AV_CODEC_ID_H263 || s->codec_id==AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_H263I)) s->gob_index = ff_h263_get_gob_height(s); |