[FFmpeg-devel] [PATCH 1/2] avidec: XMPG support

Michael Niedermayer michaelni at gmx.at
Sat Jan 14 18:35:57 CET 2012


On Fri, Jan 13, 2012 at 07:35:47PM +0000, Paul B Mahol wrote:
> On 1/13/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavformat/avidec.c |   23 +++++++++++++++++++++++
> >  libavformat/riff.c   |    1 +
> >  2 files changed, 24 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> > index 6112af4..b04b933 100644
> > --- a/libavformat/avidec.c
> > +++ b/libavformat/avidec.c
> > @@ -694,6 +694,29 @@ static int avi_read_header(AVFormatContext *s,
> > AVFormatParameters *ap)
> >                  }
> >              }
> >              break;
> > +        case MKTAG('s', 't', 'r', 'd'):
> > +            if (stream_index >= (unsigned)s->nb_streams) {
> > +                avio_skip(pb, size);
> > +            } else {
> > +                uint64_t cur_pos = avio_tell(pb);
> > +                if (cur_pos < list_end)
> > +                    size = FFMIN(size, list_end - cur_pos);
> > +                st = s->streams[stream_index];
> > +
> > +                if(size<(1<<30) && !st->codec->extradata_size){
> > +                    st->codec->extradata_size= size;
> > +                    st->codec->extradata=
> > av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
> > +                    if (!st->codec->extradata) {
> > +                        st->codec->extradata_size= 0;
> > +                        return AVERROR(ENOMEM);
> > +                    }
> > +                    avio_read(pb, st->codec->extradata,
> > st->codec->extradata_size);
> > +                }
> > +
> > +                if(st->codec->extradata_size & 1) //FIXME check if the
> > encoder really did this correctly
> > +                    avio_r8(pb);
> > +            }
> > +            break;
> >          case MKTAG('i', 'n', 'd', 'x'):
> >              i= avio_tell(pb);
> >              if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) &&
> > avi->use_odml &&
> > diff --git a/libavformat/riff.c b/libavformat/riff.c
> > index cd2c9a0..17a0260 100644
> > --- a/libavformat/riff.c
> > +++ b/libavformat/riff.c
> > @@ -135,6 +135,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
> >      { CODEC_ID_MPEG2VIDEO,   MKTAG('E', 'M', '2', 'V') },
> >      { CODEC_ID_MPEG2VIDEO,   MKTAG('M', '7', '0', '1') }, /* Matrox MPEG2
> > intra-only */
> >      { CODEC_ID_MPEG2VIDEO,   MKTAG('m', 'p', 'g', 'v') },
> > +    { CODEC_ID_MPEG1VIDEO,   MKTAG('X', 'M', 'P', 'G') },
> 
> nit: add comment /* Xing MPEG intra only */
> 
> >      { CODEC_ID_MJPEG,        MKTAG('M', 'J', 'P', 'G') },
> >      { CODEC_ID_MJPEG,        MKTAG('L', 'J', 'P', 'G') },
> >      { CODEC_ID_MJPEG,        MKTAG('d', 'm', 'b', '1') },
> > --
> > 1.7.5.4
> >
> 
> OK, ty

applied, thanks

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

Incandescent light bulbs waste a lot of energy as heat so the EU forbids them.
Their replacement, compact fluorescent lamps, much more expensive, dont fit in
many old lamps, flicker, contain toxic mercury, produce a fraction of the light
that is claimed and in a unnatural spectrum rendering colors different than
in natural light. Ah and we now need to turn the heaters up more in winter to
compensate the lower wasted heat. Who wins? Not the environment, thats for sure
-------------- 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/20120114/f75ebf03/attachment.asc>


More information about the ffmpeg-devel mailing list