[FFmpeg-devel] G726 in Matroska

Anatoliy Nenashev nenashev_as
Tue Sep 29 19:19:42 CEST 2009


Hi!
I found some problem in MKV format encoder (decoder).
I try to encode some audio file in G726 and put it in MKV container:
ffmpeg -i  in.wav -acodec g726 -ac 1 -ar 8000 -ab 40000 out.mkv

After that I try to play this file with ffplay. I see the message:

[matroska @ 0x1d58d90]Unknown/unsupported CodecID A_MS/ACM.
[matroska @ 0x1d58d90]Could not find codec parameters (Audio: 0x0000, 
8000 Hz, mono, s16)

GDB research show that audio  codec private data size in MKV file is 16. 
But in the file I found the strings:
} else if (!strcmp(track->codec_id, "A_MS/ACM")
                   && track->codec_priv.size >= 18
                   && track->codec_priv.data != NULL) {
            init_put_byte(&b, track->codec_priv.data, 
track->codec_priv.size,
                          URL_RDONLY, NULL, NULL, NULL, NULL);
            get_wav_header(&b, st->codec, track->codec_priv.size);
            codec_id = st->codec->codec_id;
            extradata_offset = 18;
            track->codec_priv.size -= extradata_offset;
        } else if (!strcmp(track->codec_id, "V_QUICKTIME")


It means that ffplay can't obtain real codec_id because of 
"track->codec_priv.size < 18 (=16)".

Is it mistake in MKV decoder code or in encoder?




More information about the ffmpeg-devel mailing list