[FFmpeg-devel] [PATCH] play aiff without common tag

Baptiste Coudurier baptiste.coudurier
Mon Jun 25 18:04:51 CEST 2007


Hi Reimar,

Reimar D?ffinger wrote:
> Hello,
> attached patch fixes
> http://samples.mplayerhq.hu/AIFF/invalid_nocommon.aiff.
> While according to the specification says this file invalid I think it
> is preferable to support it anyway, esp. because leaving values
> uninitialized and even causing a division by zero is really bad anyway
> (and it even leaves e.g. MPlayer thinking this is a video file...).
> 

Division by zero must be fixed of course.

> @@ -312,6 +305,11 @@
>      st = av_new_stream(s, 0);
>      if (!st)
>          return AVERROR_NOMEM;
> +    st->codec->codec_type = CODEC_TYPE_AUDIO;
> +    st->codec->codec_id = CODEC_ID_PCM_S16BE;
> +    st->codec->bits_per_sample = 16;
> +    st->codec->sample_rate = 11025;
> +    st->codec->channels = 2;
>  

Humm, what do we do if a file containing PCM_S24BE, 4 channels at 48khz
miss COMM chunk ?

I would be more in favor of returning -1 and saying the file is broken
here, there is not much we can do to workaround.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list