[FFmpeg-devel] [PATCH] Psygnosis YOP demuxer

Diego Biurrun diego
Thu Aug 13 08:09:33 CEST 2009


On Wed, Aug 12, 2009 at 11:00:52PM -0400, Thomas Higdon wrote:
> 
> --- Changelog	(revision 19610)
> +++ Changelog	(working copy)
> @@ -31,6 +31,7 @@
>  - RTMP support in libavformat
>  - noX handling for OPT_BOOL X options
> +- Add Psygnosis YOP demuxer

Update needed.

> --- libavformat/yopdec.c	(revision 0)
> +++ libavformat/yopdec.c	(revision 0)
> @@ -0,0 +1,200 @@
> +
> +static int yop_probe(AVProbeData *probe_packet)
> +{
> +    const char *yop_signature = "YO";
> +    if (memcmp(yop_signature, probe_packet->buf, strlen(yop_signature))) {
> +        return 0;
> +    }

useless {}

> +    YopDecContext *yop = s->priv_data;
> +    ByteIOContext *pb = s->pb;

align

> +    if (!video_stream->codec->extradata) {
> +        return AVERROR(ENOMEM);
> +    }

useless {}

> +    if ((ret = get_buffer(pb, video_dec->extradata, 8)) != 8) {
> +        return -1;
> +    }

useless {}, more below

> +    yop->sound_data_length = 1840 / 2;
> +    yop->sound_chunk_length = *(uint16_t *)(video_dec->extradata + 6);

align, more below

Diego



More information about the ffmpeg-devel mailing list