diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-29 14:42:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-29 14:45:55 +0200 |
commit | 8672fc7b0453098d862bb1c0caafab4823ee0b4e (patch) | |
tree | 61e47d15de63bd72f6e6a73ecfb8697bb4b687b1 /libavcodec/ivi_common.c | |
parent | 74bd0cf49c9c0bee8d4f3d3a98a7343c2ff5b94c (diff) | |
parent | b146d74730ab9ec5abede9066f770ad851e45fbc (diff) | |
download | ffmpeg-8672fc7b0453098d862bb1c0caafab4823ee0b4e.tar.gz |
Merge commit 'b146d74730ab9ec5abede9066f770ad851e45fbc'
* commit 'b146d74730ab9ec5abede9066f770ad851e45fbc':
indeo4: update AVCodecContext width/height on size change
dfa: check that the caller set width/height properly.
indeo5dec: Make sure we have had a valid gop header.
cavsdec: check for changing w/h.
lavc: set channel count from channel layout in avcodec_open2().
doc/platform: Rework the Visual Studio linking section
doc/faq: Change the Visual Studio entry to reflect current status
doc/platform: Replace Visual Studio section with build instructions
doc/platform: Nuke section on linking static MinGW-built libs with MSVC
doc/platform: Remove false claim about MinGW installer
doc/platform: Mention MinGW-w64
dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
mpegaudiodec: fix short_start calculation
Conflicts:
doc/faq.texi
doc/platform.texi
libavcodec/cavsdec.c
libavcodec/indeo5.c
libavcodec/ivi_common.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ivi_common.c')
-rw-r--r-- | libavcodec/ivi_common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c index 98e3e25b93..f0c81be6cb 100644 --- a/libavcodec/ivi_common.c +++ b/libavcodec/ivi_common.c @@ -755,11 +755,13 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, ctx->frame_size = buf_size; result = ctx->decode_pic_hdr(ctx, avctx); - if (result || ctx->gop_invalid) { + if (result) { av_log(avctx, AV_LOG_ERROR, "Error while decoding picture header: %d\n", result); return -1; } + if (ctx->gop_invalid) + return AVERROR_INVALIDDATA; if (ctx->gop_flags & IVI5_IS_PROTECTED) { av_log(avctx, AV_LOG_ERROR, "Password-protected clip!\n"); @@ -805,8 +807,8 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, if (ctx->frame.data[0]) avctx->release_buffer(avctx, &ctx->frame); - avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height); ctx->frame.reference = 0; + avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height); if ((result = avctx->get_buffer(avctx, &ctx->frame)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return result; |