diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2008-06-07 22:29:27 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2008-06-07 22:29:27 +0000 |
commit | aa5d6be8dff77660dc620f04a0cd655caf294fc1 (patch) | |
tree | 8830833334e30d5b8c8b1b44230633077e618455 /libavcodec | |
parent | be5f17b96bdd68d06397d62bdc6798d20546fe32 (diff) | |
download | ffmpeg-aa5d6be8dff77660dc620f04a0cd655caf294fc1.tar.gz |
skip unsupported frame types and substream id's
Originally committed as revision 13691 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ac3dec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 9bfbec39b7..b7941c1623 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1175,7 +1175,14 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, av_log(avctx, AV_LOG_ERROR, "invalid frame size\n"); break; case AC3_PARSE_ERROR_FRAME_TYPE: + /* skip frame if CRC is ok. otherwise use error concealment. */ + /* TODO: add support for substreams and dependent frames */ + if(s->frame_type == EAC3_FRAME_TYPE_DEPENDENT || s->substreamid) { + av_log(avctx, AV_LOG_ERROR, "unsupported frame type : skipping frame\n"); + return s->frame_size; + } else { av_log(avctx, AV_LOG_ERROR, "invalid frame type\n"); + } break; default: av_log(avctx, AV_LOG_ERROR, "invalid header\n"); |