[libav-devel] [PATCH] ttadec: unbreak playback of matroska files

Luca Barbato lu_zero at gentoo.org
Tue Mar 6 22:01:59 CET 2012


On 06/03/12 12:26, Paul B Mahol wrote:
> Matroska demuxer needs to recreate tta header, so just display
> crc error without aborting.
> 
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/tta.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/tta.c b/libavcodec/tta.c
> index 269ba86..ad80246 100644
> --- a/libavcodec/tta.c
> +++ b/libavcodec/tta.c
> @@ -208,8 +208,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
>      {
>          if (avctx->err_recognition & AV_EF_CRCCHECK) {
>              s->crc_table = av_crc_get_table(AV_CRC_32_IEEE_LE);
> -            if (tta_check_crc(s, avctx->extradata, 18))
> -                return AVERROR_INVALIDDATA;
> +            tta_check_crc(s, avctx->extradata, 18);
>          }
>  
>          /* signature */

Do you have a testcase? it doesn't look particularly robust.

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero



More information about the libav-devel mailing list