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

Vitor Sessak vitor1001
Mon Dec 14 20:23:42 CET 2009


Yadu Nand wrote:
>  Hi,
> 
> 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.
> 
> [1] http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/95133/focus=95474

Just a comment:

> +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))
> +        return AVPROBE_SCORE_MAX/2 + 1;

You can do much better by checking all the fields num_frames, 
frame_rate, etc for consistency (at least != 0).

-Vitor



More information about the ffmpeg-devel mailing list