[FFmpeg-devel] [PATCH 3/3] mp3/mp2: identify the video codecs as APIC through query_codec.

Michael Niedermayer michaelni at gmx.at
Fri Aug 10 17:24:54 CEST 2012


On Sat, Aug 04, 2012 at 06:03:26PM +0000, Paul B Mahol wrote:
> On 8/4/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Fixes Ticket1408
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavformat/mp3enc.c |   13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
> > index 80d4675..f2469a6 100644
> > --- a/libavformat/mp3enc.c
> > +++ b/libavformat/mp3enc.c
> > @@ -370,6 +370,17 @@ static int mp2_write_trailer(struct AVFormatContext
> > *s)
> >      return 0;
> >  }
> >
> > +static int query_codec(enum CodecID id, int std_compliance)
> > +{
> > +    CodecMime *cm= ff_id3v2_mime_tags;
> > +    while(cm->id != CODEC_ID_NONE) {
> > +        if(id == cm->id)
> > +            return MKTAG('A', 'P', 'I', 'C');
> > +        cm++;
> > +    }
> > +    return -1;
> > +}
> > +
> >  #if CONFIG_MP2_MUXER
> >  AVOutputFormat ff_mp2_muxer = {
> >      .name              = "mp2",
> > @@ -380,6 +391,7 @@ AVOutputFormat ff_mp2_muxer = {
> >      .video_codec       = CODEC_ID_NONE,
> >      .write_packet      = ff_raw_write_packet,
> >      .write_trailer     = mp2_write_trailer,
> > +    .query_codec       = query_codec,
> 
> I'm not sure tags are exported for mp2.
>

droped that part then

rest applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120810/0be34ec9/attachment.asc>


More information about the ffmpeg-devel mailing list