Mercurial > libavcodec.hg
comparison mlpdec.c @ 9530:dbb16aa52d43 libavcodec
mlpdec: Restart header sync must be 0x31ea for MLP.
author | ramiro |
---|---|
date | Tue, 21 Apr 2009 21:57:23 +0000 |
parents | 41ab6db265d0 |
children | 19a70bcc2220 |
comparison
equal
deleted
inserted
replaced
9529:e885f6298a7a | 9530:dbb16aa52d43 |
---|---|
335 uint8_t checksum; | 335 uint8_t checksum; |
336 uint8_t lossless_check; | 336 uint8_t lossless_check; |
337 int start_count = get_bits_count(gbp); | 337 int start_count = get_bits_count(gbp); |
338 | 338 |
339 sync_word = get_bits(gbp, 13); | 339 sync_word = get_bits(gbp, 13); |
340 | 340 s->noise_type = get_bits1(gbp); |
341 if (sync_word != 0x31ea >> 1) { | 341 |
342 if ((m->avctx->codec_id == CODEC_ID_MLP && s->noise_type) || | |
343 sync_word != 0x31ea >> 1) { | |
342 av_log(m->avctx, AV_LOG_ERROR, | 344 av_log(m->avctx, AV_LOG_ERROR, |
343 "restart header sync incorrect (got 0x%04x)\n", sync_word); | 345 "restart header sync incorrect (got 0x%04x)\n", sync_word); |
344 return -1; | 346 return -1; |
345 } | 347 } |
346 s->noise_type = get_bits1(gbp); | |
347 | 348 |
348 skip_bits(gbp, 16); /* Output timestamp */ | 349 skip_bits(gbp, 16); /* Output timestamp */ |
349 | 350 |
350 s->min_channel = get_bits(gbp, 4); | 351 s->min_channel = get_bits(gbp, 4); |
351 s->max_channel = get_bits(gbp, 4); | 352 s->max_channel = get_bits(gbp, 4); |