[FFmpeg-devel] [PATCH] play aiff without common tag
Mon Jun 25 19:28:42 CEST 2007
On Mon, Jun 25, 2007 at 06:04:51PM +0200, Baptiste Coudurier wrote:
> 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 ?
we fail to play it properly
but we dont have such a file ...
> 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.
if other players can play it we should play it too, ffmpeg should at least
support everything other players do
it should also support everything that is valid according to the specs
and everything that is easy to support
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the ffmpeg-devel