[Ffmpeg-devel] CDXA in libavformat [patch]

Michael Niedermayer michaelni
Sat Aug 19 00:30:40 CEST 2006


Hi

On Fri, Aug 18, 2006 at 06:33:28PM +0200, Allan Sandfeld Jensen wrote:
> Hi again
> 
> I've tried implementing the information in a CDXA format wrapper and it seems 
> to work perfectly. 
> 
> Technically you don't need the code in cdxa_read_header, but I thought it 
> would be best to skip forward rather than let the MPEG packet decoder search 
> through 64kbyte of zeroes.

disagree, if the code isnt needed its redundant and shouldnt be there

[...]
> +static int cdxa_probe(AVProbeData *p)
> +{
> +    /* check file header */
> +    if (p->buf_size <= 32)
> +        return 0;
> +    if (p->buf[0] == 'R' && p->buf[1] == 'I' &&
> +        p->buf[2] == 'F' && p->buf[3] == 'F' &&
> +        p->buf[8] == 'C' && p->buf[9] == 'D' &&
> +        p->buf[10] == 'X' && p->buf[11] == 'A')
> +        return AVPROBE_SCORE_MAX;
> +    else
> +        return 0;
> +}

that could be put in mpegps_probe()

[...]

>  static int64_t get_pts(ByteIOContext *pb, int c)
>  {
>      int64_t pts;
> @@ -1563,7 +1617,8 @@
>      MpegDemuxContext *m = s->priv_data;
>      AVStream *st;
>      int len, startcode, i, type, codec_id = 0, es_type;
> -    int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
> +    int64_t pts=AV_NOPTS_VALUE, dts=AV_NOPTS_VALUE;
> +    int64_t dummy_pos; //dummy_pos is needed for the index building to work

this change whatever it is good for does not belong in that patch ->
seperate patch or drop it

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list