[FFmpeg-devel] Fwd: [PATCH] Psygnosis YOP demuxer

Diego Biurrun diego
Mon Dec 14 18:19:02 CET 2009


On Mon, Dec 14, 2009 at 10:15:26PM +0530, Yadu Nand wrote:
> 
> Attached patch is a cleaned up variant of the one submitted by Thomas
> Higdon [1] and includes the demuxer only. The decoder patch will
> follow once (hopefully) this is in.
> Comments appreciated.
> 
> --- Changelog	(revision 20110)
> +++ Changelog	(working copy)
> @@ -40,9 +40,9 @@
>  - Core Audio Format demuxer
>  - Atrac1 decoder
>  - MD STUDIO audio demuxer
> +- Psygnosis YOP demuxer
>  
>  
> -
>  version 0.5:

That empty line was there on purpose.

> --- libavformat/yopdec.c	(revision 0)
> +++ libavformat/yopdec.c	(revision 0)
> @@ -0,0 +1,170 @@
> +static int yop_probe(AVProbeData *probe_packet)
> +{
> +   	if ((AV_RB16(probe_packet->buf) == AV_RB16("YO"))
> +	 	 && !(AV_RL16(probe_packet->buf + 8) & 1) && !(AV_RL16(probe_packet->buf + 10) & 1))

weird indentation

> +    int actual_video_data_size =
> +        yop->frame_size - yop->sound_chunk_length - palette_size;

IMO more readable:

  int actual_video_data_size = yop->frame_size - yop->sound_chunk_length -
                               palette_size;

or

  int actual_video_data_size = yop->frame_size -
                               yop->sound_chunk_length - palette_size;

Diego



More information about the ffmpeg-devel mailing list