[FFmpeg-devel] [PATCH] Video decoder and demuxer for AMV files

Vladimir Voroshilov voroshil
Sat Sep 29 04:04:22 CEST 2007


2007/9/29, Michael Niedermayer <michaelni at gmx.at>:
> On Wed, Sep 26, 2007 at 11:01:52PM +0700, Vladimir Voroshilov wrote:
> [...]
>
> > Index: mplayer/libavformat/avidec.c
> > ===================================================================
> > --- mplayer/libavformat/avidec.c      (revision 10592)
> > +++ mplayer/libavformat/avidec.c      (working copy)
> > @@ -58,6 +58,7 @@
> >  } AVIContext;
> >
> >  static const char avi_headers[][8] = {
> > +    { 'R', 'I', 'F', 'F',    'A', 'M', 'V', ' ' },
> >      { 'R', 'I', 'F', 'F',    'A', 'V', 'I', ' ' },
> >      { 'R', 'I', 'F', 'F',    'A', 'V', 'I', 'X' },
> >      { 'R', 'I', 'F', 'F',    'A', 'V', 'I', 0x19},
>
> this hunk can be commited
>
>
> > @@ -286,8 +291,11 @@
> >
> >              url_fskip(pb, 2 * 4);
> >              get_le32(pb);
> > +            get_le32(pb);
> > +            width=get_le32(pb);//streams
> > +            height=get_le32(pb);//buf
>
> what are these comments trying to say?

Copy-paste error. Removed.

> > @@ -416,6 +426,15 @@
> >                  st = s->streams[stream_index];
> >                  switch(codec_type) {
> >                  case CODEC_TYPE_VIDEO:
> > +                    if(amv_file_format){
> > +                        st->codec->width=width;
> > +                        st->codec->height=height;
> > +                        st->codec->codec_type = CODEC_TYPE_VIDEO;
> > +                        st->codec->codec_id = CODEC_ID_AMVVIDEO;
>
> > +                        st->codec->codec_tag = 0;
>
> why? what value is it here without that?

Hm, zero. Removed.
I have also removed similar line for audio. It is not required to be zero and
causes amv muxer to fail in print_wav_header.

Updated patch attached.

-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amv_demux_fmpeg_as_avi3.diff
Type: text/x-diff
Size: 2659 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070929/3f7be4e1/attachment.diff>



More information about the ffmpeg-devel mailing list