diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-05 02:17:15 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-05 02:17:15 +0100 |
commit | 9ca32b2060ecaf625fb5679bd69c3f579ef03b95 (patch) | |
tree | 958bd6e5ef02e84a61cfe66209f03f32cc0364c5 /libavcodec | |
parent | 63f74cedc9c749cba33b4ce2aa7c164da38edd3e (diff) | |
download | ffmpeg-9ca32b2060ecaf625fb5679bd69c3f579ef03b95.tar.gz |
avcodec/cavsdec: print warning if no frame has been decoded
Fixes ticket3128
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cavsdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 3005870333..d4872b61af 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -1167,8 +1167,11 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, buf_end = buf + buf_size; for(;;) { buf_ptr = avpriv_find_start_code(buf_ptr, buf_end, &stc); - if ((stc & 0xFFFFFE00) || buf_ptr == buf_end) + if ((stc & 0xFFFFFE00) || buf_ptr == buf_end) { + if (!h->stc) + av_log(h->avctx, AV_LOG_WARNING, "no frame decoded\n"); return FFMAX(0, buf_ptr - buf); + } input_size = (buf_end - buf_ptr) * 8; switch (stc) { case CAVS_START_CODE: |