Commit 85bbe1db authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '0670acc4'

* commit '0670acc4':
  dca_parser: Extend DTS core sync word and fix existing check

Conflicts:
	libavcodec/dca_parser.c

See: e80b2b9cMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents acf4925f 0670acc4
...@@ -66,7 +66,9 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf, ...@@ -66,7 +66,9 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
for (i = 0; i < buf_size; i++) { for (i = 0; i < buf_size; i++) {
state = (state << 8) | buf[i]; state = (state << 8) | buf[i];
if (IS_MARKER(state)) { if (IS_MARKER(state)) {
if (!pc1->lastmarker || CORE_MARKER(state) == pc1->lastmarker || pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM) { if (!pc1->lastmarker ||
pc1->lastmarker == CORE_MARKER(state) ||
pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM) {
start_found = 1; start_found = 1;
if (IS_EXSS_MARKER(state)) if (IS_EXSS_MARKER(state))
pc1->lastmarker = EXSS_MARKER(state); pc1->lastmarker = EXSS_MARKER(state);
...@@ -82,7 +84,9 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf, ...@@ -82,7 +84,9 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
for (; i < buf_size; i++) { for (; i < buf_size; i++) {
pc1->size++; pc1->size++;
state = (state << 8) | buf[i]; state = (state << 8) | buf[i];
if (IS_MARKER(state) && (CORE_MARKER(state) == pc1->lastmarker || pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM)) { if (IS_MARKER(state) &&
(pc1->lastmarker == CORE_MARKER(state) ||
pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM)) {
if (pc1->framesize > pc1->size) if (pc1->framesize > pc1->size)
continue; continue;
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