On Sun, Jan 08, 2012 at 06:00:44PM -0800, [email protected] wrote:
> --- a/doc/general.texi
> +++ b/doc/general.texi
> @@ -188,6 +188,7 @@ library:
> @item MAXIS XA @tab @tab X
> @tab Used in Sim City 3000; file extension .xa.
> @item MD Studio @tab @tab X
> +@item MGS VP3 @tab @tab X
> @item Mobotix .mxg @tab @tab X
Maybe add a comment with the game name like for maxis xa?
> --- /dev/null
> +++ b/libavformat/mgsvp3.c
> @@ -0,0 +1,92 @@
> +
> +#include "avformat.h"
> +#include "riff.h"
> +#include "libavutil/intfloat.h"
> +#include "libavutil/intreadwrite.h"
nit: libavutil headers before libavformat headers.
> +static int probe(AVProbeData *p)
> +{
> + if (AV_RB32(p->buf) == PACKET_SIGNATURE)
> + return AVPROBE_SCORE_MAX-2;
nit: space around -
> + st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
> + st->codec->codec_id = CODEC_ID_VP3;
> + avio_skip(s->pb, 28);
> + st->duration = avio_rb32(s->pb);
> + avpriv_set_pts_info(st, 32, 1, av_int2float(avio_rb32(s->pb))); /*
> framerate is a float */
> + st->codec->width = avio_rb32(s->pb);
> + st->codec->height = avio_rb32(s->pb);
> + avio_skip(s->pb, 12);
> + st->codec->codec_tag = avio_rb32(s->pb); /* read it backwards so it's
> in the right order */
> + st->codec->pix_fmt = PIX_FMT_YUV420P;
> + avio_skip(s->pb, 20);
nit: align some =
> +static int read_packet(AVFormatContext *s, AVPacket *pkt)
> +{
> + int ret;
> + int header;
> + int packet_size;
> + int payload_size;
nit: maybe merge into one line
> + header = avio_rb32(s->pb);
> + packet_size = avio_rb32(s->pb);
> + avio_rb32(s->pb);
> + payload_size = avio_rb32(s->pb);
nit: align some =
> + pkt->pos = avio_tell(s->pb);
> + ret = av_get_packet(s->pb, pkt, payload_size);
> + pkt->stream_index = 0;
> + pkt->pts = counter++;
ditto
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel