[FFmpeg-devel] [PATCH] Additional probing based on sequence header and group startcodes

Baptiste Coudurier baptiste.coudurier
Sat Jun 13 23:18:08 CEST 2009


Hi Jai,

Jai Menon wrote:
> Hi,
> 
> I'm not too familiar with the probing mechanism so any help is
> appreciated. This might not be the right way to do it. Also, this
> fixes issue 1185 and possibly others.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> From fabab72d398ee9a66b7ca0ba4c84c486c2a10d02 Mon Sep 17 00:00:00 2001
> From: Jai Menon <jai at retroficial.org>
> Date: Sun, 14 Jun 2009 01:55:51 +0000
> Subject: [PATCH 2/2] add additional probing based on seq hdr and group startcode.
> 
> ---
>  libavformat/mpeg.c  |    5 +++++
>  libavformat/utils.c |    3 +++
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
> index 166e621..4e7638f 100644
> --- a/libavformat/mpeg.c
> +++ b/libavformat/mpeg.c
> @@ -54,6 +54,7 @@ static int mpegps_probe(AVProbeData *p)
>  {
>      uint32_t code= -1;
>      int sys=0, pspack=0, priv1=0, vid=0, audio=0, invalid=0;
> +    int seqhdr_code = 0, group_startcode = 0; 
>      int i;
>      int score=0;
>  
> @@ -70,6 +71,8 @@ static int mpegps_probe(AVProbeData *p)
>  
>              else if((code & 0xf0) == VIDEO_ID && !pes) invalid++;
>              else if((code & 0xe0) == AUDIO_ID && !pes) invalid++;
> +            else if(code == 0x1b3) seqhdr_code++;
> +            else if(code == 0x1b8) group_startcode++;

gop_startcode.

[...]

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list