aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mlpdec.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2009-04-21 21:57:23 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2009-04-21 21:57:23 +0000
commit46958efe97b53ee56725d2f03555e06dbead5e30 (patch)
tree9441d4f70606b24ce765ddac46633091a1d2ca81 /libavcodec/mlpdec.c
parent5499a313228d2345da41f6f6202a6f789706d442 (diff)
downloadffmpeg-46958efe97b53ee56725d2f03555e06dbead5e30.tar.gz
mlpdec: Restart header sync must be 0x31ea for MLP.
Originally committed as revision 18648 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r--libavcodec/mlpdec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index bf490abbd8..493296098a 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -337,13 +337,14 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
int start_count = get_bits_count(gbp);
sync_word = get_bits(gbp, 13);
+ s->noise_type = get_bits1(gbp);
- if (sync_word != 0x31ea >> 1) {
+ if ((m->avctx->codec_id == CODEC_ID_MLP && s->noise_type) ||
+ sync_word != 0x31ea >> 1) {
av_log(m->avctx, AV_LOG_ERROR,
"restart header sync incorrect (got 0x%04x)\n", sync_word);
return -1;
}
- s->noise_type = get_bits1(gbp);
skip_bits(gbp, 16); /* Output timestamp */