diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-09-21 02:29:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-21 13:32:56 +0200 |
commit | ff34b2d6d35b212523428b9b932cce4914f7ac03 (patch) | |
tree | 1a33096e77d6a766d9e83c0af3b1491999ee2ed4 /libavcodec/mlpdec.c | |
parent | 6821a5a4adcb40c458356e8bb90416dd8f5dd6b2 (diff) | |
download | ffmpeg-ff34b2d6d35b212523428b9b932cce4914f7ac03.tar.gz |
mlpdec: support major sync headers with optional extension blocks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index ed6a7fb58c..fddeb14ad7 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -132,6 +132,9 @@ typedef struct MLPDecodeContext { /// Current access unit being read has a major sync. int is_major_sync_unit; + /// Size of the major sync unit, in bytes + int major_sync_header_size; + /// Set if a valid major sync block has been read. Otherwise no decoding is possible. uint8_t params_valid; @@ -349,6 +352,8 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) return AVERROR_PATCHWELCOME; } + m->major_sync_header_size = mh.header_size; + m->access_unit_size = mh.access_unit_size; m->access_unit_size_pow2 = mh.access_unit_size_pow2; @@ -1142,7 +1147,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data, if (read_major_sync(m, &gb) < 0) goto error; m->is_major_sync_unit = 1; - header_size += 28; + header_size += m->major_sync_header_size; } if (!m->params_valid) { |