aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mlpdec.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2014-09-21 02:29:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-21 13:32:56 +0200
commitff34b2d6d35b212523428b9b932cce4914f7ac03 (patch)
tree1a33096e77d6a766d9e83c0af3b1491999ee2ed4 /libavcodec/mlpdec.c
parent6821a5a4adcb40c458356e8bb90416dd8f5dd6b2 (diff)
downloadandroid_external_ffmpeg-ff34b2d6d35b212523428b9b932cce4914f7ac03.tar.gz
android_external_ffmpeg-ff34b2d6d35b212523428b9b932cce4914f7ac03.tar.bz2
android_external_ffmpeg-ff34b2d6d35b212523428b9b932cce4914f7ac03.zip
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.c7
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) {