[FFmpeg-devel] [PATCH]lavf/matroskadec: Set codec_tag also for audio codecs

Michael Niedermayer michaelni at gmx.at
Fri Dec 11 17:04:21 CET 2015


On Fri, Dec 11, 2015 at 09:32:23AM +0100, Carl Eugen Hoyos wrote:
> On Friday 11 December 2015 02:29:53 am Michael Niedermayer wrote:
> > On Thu, Dec 10, 2015 at 11:50:45PM +0100, Carl Eugen Hoyos wrote:
> > > Hi!
> > >
> > > Attached patch is definitely a good idea imo, the mov demuxer also
> > > sets codec_tag reading the same atom, for "A_MS/ACM" codec_tag is
> > > already set.
> > >
> > > Please comment, Carl Eugen
> > >
> > >  matroskadec.c |    1 +
> > >  1 file changed, 1 insertion(+)
> > > 2304ec17547647dad8121a55cac95f099a8e6ef1  patchmkvaudiofourcc.diff
> > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > > index aad567a..95cebdd 100644
> > > --- a/libavformat/matroskadec.c
> > > +++ b/libavformat/matroskadec.c
> > > @@ -2124,6 +2124,7 @@ static int matroska_parse_tracks(AVFormatContext
> > > *s) }
> > >          } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
> > >              st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
> > > +            st->codec->codec_tag   = fourcc;
> > >              st->codec->sample_rate = track->audio.out_samplerate;
> > >              st->codec->channels    = track->audio.channels;
> > >              if (!st->codec->bits_per_coded_sample)
> >
> > this changes things like:
> >  Stream #0:7(jpn): Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 11025 Hz,
> > 2 channels, s16p, 88 kb/s to
> >  Stream #0:7(jpn): Audio: adpcm_ima_wav, 11025 Hz, 2 channels, s16p, 88
> > kb/s
> >
> > in [CCCP]_Mega_Weird_Audio_Test.mkv
> >
> > is that intended ?
> 
> No, new patch attached.
> 
> Thank you, Carl Eugen

>  matroskadec.c |    2 ++
>  1 file changed, 2 insertions(+)
> 77e6700373ba86f49886c58ef28a9ffbd9b7e001  patchmkvaudiofourcc.diff
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index aad567a..b77e7e8 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c

probably ok

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151211/d39a1611/attachment.sig>


More information about the ffmpeg-devel mailing list