diff options
author | Diego Biurrun <diego@biurrun.de> | 2015-02-25 13:50:15 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2015-03-04 13:29:33 +0100 |
commit | 25f613f8be3b51e4396b93cda131e4631ba54302 (patch) | |
tree | 1756308545fcc7ac113d975027085e63787942bd /libavcodec/dca_parser.c | |
parent | 1dc19729e92a96620000e09eba8e58cb458c9486 (diff) | |
download | ffmpeg-25f613f8be3b51e4396b93cda131e4631ba54302.tar.gz |
dca: Move syncword definitions to a separate header
Diffstat (limited to 'libavcodec/dca_parser.c')
-rw-r--r-- | libavcodec/dca_parser.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index 276d8736c2..401402d391 100644 --- a/libavcodec/dca_parser.c +++ b/libavcodec/dca_parser.c @@ -23,6 +23,7 @@ */ #include "dca.h" +#include "dca_syncwords.h" #include "get_bits.h" #include "parser.h" @@ -35,9 +36,9 @@ typedef struct DCAParseContext { } DCAParseContext; #define IS_MARKER(state, i, buf, buf_size) \ - ((state == DCA_MARKER_14B_LE && (i < buf_size - 2) && (buf[i + 1] & 0xF0) == 0xF0 && buf[i + 2] == 0x07) || \ - (state == DCA_MARKER_14B_BE && (i < buf_size - 2) && buf[i + 1] == 0x07 && (buf[i + 2] & 0xF0) == 0xF0) || \ - state == DCA_MARKER_RAW_LE || state == DCA_MARKER_RAW_BE) + ((state == DCA_SYNCWORD_CORE_14B_LE && (i < buf_size - 2) && (buf[i + 1] & 0xF0) == 0xF0 && buf[i + 2] == 0x07) || \ + (state == DCA_SYNCWORD_CORE_14B_BE && (i < buf_size - 2) && buf[i + 1] == 0x07 && (buf[i + 2] & 0xF0) == 0xF0) || \ + state == DCA_SYNCWORD_CORE_LE || state == DCA_SYNCWORD_CORE_BE) /** * Find the end of the current frame in the bitstream. @@ -75,7 +76,7 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf, for (; i < buf_size; i++) { pc1->size++; state = (state << 8) | buf[i]; - if (state == DCA_HD_MARKER && !pc1->hd_pos) + if (state == DCA_SYNCWORD_SUBSTREAM && !pc1->hd_pos) pc1->hd_pos = pc1->size; if (state == pc1->lastmarker && IS_MARKER(state, i, buf, buf_size)) { if (pc1->framesize > pc1->size) |