Commit 022d22e5 authored by Hendrik Leppkes's avatar Hendrik Leppkes Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 14474fbb
...@@ -74,7 +74,8 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf, ...@@ -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 (IS_MARKER(state, i, buf, buf_size) && (state == pc1->lastmarker || pc1->lastmarker == DCA_HD_MARKER)) {
if(pc1->framesize > pc1->size) if(pc1->framesize > pc1->size)
continue; 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; pc1->framesize = pc1->hd_pos ? pc1->hd_pos : pc1->size;
} }
pc->frame_start_found = 0; pc->frame_start_found = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment