diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2011-07-25 21:32:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-28 15:26:31 +0200 |
commit | 022d22e5810d1c90f618fddd751b1f03502d6021 (patch) | |
tree | f1ca69af2e0f480166468ad372f31c4dd4cc512d /libavcodec | |
parent | 14474fbbd0dd85bfea612e5fc8c6e42b086ba910 (diff) | |
download | ffmpeg-022d22e5810d1c90f618fddd751b1f03502d6021.tar.gz |
Fix a regression in the dca parser introduced by dts express support.
The dca parser needs to check that the framesize is actually of a complete
frame, and not of a partial DTS-HD frame, which is not constant size, and
thus the check would fail.
(cherry picked from commit ebc0ccb9af59b78732e82c09f8c90b1d46b478e0)
Review-by: Benjamin Larsson
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dca_parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index ff9176906d..74e65228af 100644 --- a/libavcodec/dca_parser.c +++ b/libavcodec/dca_parser.c @@ -74,7 +74,8 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf, if (IS_MARKER(state, i, buf, buf_size) && (state == pc1->lastmarker || pc1->lastmarker == DCA_HD_MARKER)) { if(pc1->framesize > pc1->size) continue; - if(!pc1->framesize){ + // We have to check that we really read a full frame here, and that it isn't a pure HD frame, because their size is not constant. + if(!pc1->framesize && state == pc1->lastmarker && state != DCA_HD_MARKER){ pc1->framesize = pc1->hd_pos ? pc1->hd_pos : pc1->size; } pc->frame_start_found = 0; |