[FFmpeg-cvslog] r14861 - trunk/libavformat/matroskadec.c

Aurelien Jacobs aurel
Wed Aug 20 15:22:35 CEST 2008


On Wed, 20 Aug 2008 11:32:04 +0200
Stefano Sabatini <stefano.sabatini-lala at poste.it> wrote:

> On date Wednesday 2008-08-20 02:44:26 +0200, aurel wrote:
> > Author: aurel
> > Date: Wed Aug 20 02:44:25 2008
> > New Revision: 14861
> > 
> > Log:
> > matroskadec: handle EBML_ID_VOID and EBML_ID_CRC32 in a generic way
> > 
> > Modified:
> >    trunk/libavformat/matroskadec.c
> > 
> > Modified: trunk/libavformat/matroskadec.c
> > ==============================================================================
> > --- trunk/libavformat/matroskadec.c	(original)
> > +++ trunk/libavformat/matroskadec.c	Wed Aug 20 02:44:25 2008
> > 
> > [...]
> >  
> > @@ -731,7 +692,7 @@ static int ebml_parse_id(MatroskaDemuxCo
> >      for (i=0; syntax[i].id; i++)
> >          if (id == syntax[i].id)
> >              break;
> > -    if (!syntax[i].id)
> > +    if (!syntax[i].id && id != EBML_ID_VOID && id != EBML_ID_CRC32)
> >          av_log(matroska->ctx, AV_LOG_INFO, "Unknown entry 0x%X\n", id);
> >      return ebml_parse_elem(matroska, &syntax[i], data);
> >  }
> 
> This or the next one breaks regression test here (and in FATE too):

Damn ! I was pretty sure I ran the regression test.
Well, it seems I only ran it for my first commit and not the
second one. (it is the next commit which broke reg test)

> ./ffmpeg_g -y -flags +bitexact -dct fastint -idct simple -ab 128k -ac 2 -f s16le -i tests/asynth1.sw -sample_fmt s16 -acodec pcm_u16be ./tests/data/a-pcm_u16be.mkv
> FFmpeg version SVN-r14863, Copyright (c) 2000-2008 Fabrice Bellard, et al.
>   configuration: --prefix=/home/stefano --disable-shared --enable-libschroedinger --enable-libx264 --enable-libxvid --enable-pthreads --enable-gpl --enable-debug=3 --enable-libtheora --enable-libvorbis --enable-avfilter --enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libfaad --enable-libfaac --enable-x11grab --enable-libmp3lame --disable-demuxer=v4l2 --disable-demuxer=v4l --disable-optimizations --disable-mmx
>   libavutil     49.10. 0 / 49.10. 0
>   libavcodec    51.68. 0 / 51.68. 0
>   libavformat   52.20. 0 / 52.20. 0
>   libavdevice   52. 1. 0 / 52. 1. 0
>   libavfilter    0. 1. 0 /  0. 1. 0
>   built on Aug 20 2008 11:07:45, gcc: 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
>     Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
>     Stream #0.0: Audio: pcm_u16be, 44100 Hz, stereo, s16, 1411 kb/s
> [matroska @ 0x878f800]No wav codec ID found.Could not write header for output file #0 (incorrect codec parameters ?)
> ./ffmpeg_g -y -flags +bitexact -dct fastint -idct simple -i ./tests/data/a-pcm_u16be.mkv -sample_fmt s16 -f wav ./tests/data/pcm.vsynth.out.wav

The reason is pretty simple. Matroska has no native support for u16 pcm.
(it only support s16)
So when generating this file, it tries to wrap the track in MS/ACM
compatibility mode. But as there is no support for pcm_u16 in riff.c
either, we just can't store pcm_u16 in matroska.
(previous version of the matroska muxer had support for this,
but this was broken/non-functionnal)

I've just fixed this by using pcm_s16 instead of pcm_u16 in the
regression test.

Aurel




More information about the ffmpeg-cvslog mailing list