[FFmpeg-devel] [PATCH] BFI demuxer

Michael Niedermayer michaelni
Sat Apr 12 17:37:16 CEST 2008


On Sat, Apr 12, 2008 at 08:46:52PM +0530, Sisir Koppaka wrote:
> Updated patch attached(Docs+build+demuxer).
> I'm unable to checkout directly from the repo through http(only http is
> allowed through our institute's proxy)...so I downloaded today's checkout
> tar and diffed from that. The tar doesn't have a trunk so I made the patch
> from /trunk/...I hope it won't be a problem.

[...]
> +        ret = av_get_packet(pb, pkt, audio_size);
> +        if (ret < 0)
> +            return ret;
> +
> +        pkt->stream_index = 1;
> +        pkt->pts          = bfi->audio_frame;
> +        bfi->audio_frame += ret;
> +        bfi->avflag       = 1;
> +    }
> +
> +    else {
> +
> +        //Tossing a video packet at the video decoder.
> +        ret = av_get_packet(pb, pkt, bfi->video_size);
> +        if (ret < 0)
> +            return ret;
> +
> +        pkt->stream_index = 0;
> +        pkt->pts          = bfi->video_frame;
> +        bfi->video_frame += ret / bfi->video_size;
> +        bfi->avflag       = 0;
> +
> +        /* One less frame to read. A cursory decrement. */
> +        bfi->nframes--;
> +    }

some code can be factored out of the if/else


> +
> +    return ret;
> +}
> +
> +static int bfi_read_close(AVFormatContext * s)
> +{
> +    av_close_input_stream(s);
> +    return 0;
> +}

buggy


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080412/4f9aa4f8/attachment.pgp>



More information about the ffmpeg-devel mailing list