Commit 23990950 authored by foo86's avatar foo86

avcodec/dca_parser: revert to conservative sync distance estimation

Fixes regression introduced by commit a0349ae2
when parsing 14-bit streams with excessive frame size stored in header.

Fixes ticket #6723.
parent 14b15539
...@@ -124,13 +124,13 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf, ...@@ -124,13 +124,13 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
break; break;
case DCA_SYNCWORD_CORE_14B_BE: case DCA_SYNCWORD_CORE_14B_BE:
if (size == 4) { if (size == 4) {
pc1->framesize = CORE_FRAMESIZE(STATE_14(state)) * 8 / 14 * 2; pc1->framesize = CORE_FRAMESIZE(STATE_14(state));
start_found = 4; start_found = 4;
} }
break; break;
case DCA_SYNCWORD_CORE_14B_LE: case DCA_SYNCWORD_CORE_14B_LE:
if (size == 4) { if (size == 4) {
pc1->framesize = CORE_FRAMESIZE(STATE_14(STATE_LE(state))) * 8 / 14 * 2; pc1->framesize = CORE_FRAMESIZE(STATE_14(STATE_LE(state)));
start_found = 4; start_found = 4;
} }
break; break;
......
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