[FFmpeg-devel] [PATCH] Add a RTP depacketizer for the X-Qt format

Martin Storsjö martin
Tue Oct 5 23:47:49 CEST 2010


On Tue, 5 Oct 2010, Ronald S. Bultje wrote:

> On Sun, Oct 3, 2010 at 11:45 AM, Martin Storsj? <martin at martin.st> wrote:
> > This is the first brushed up version of the depacketizer for the X-Qt
> > format (i.e., any quicktime supported format, in RTP), based on earlier
> > work by Ronald.
> [..]
> > +        if (qt->pkt.size > 0 && qt->timestamp == *timestamp) {
> > +void* ptr = qt->pkt.data;
> > +            qt->pkt.data = av_realloc(qt->pkt.data, qt->pkt.size + alen + FF_INPUT_BUFFER_PADDING_SIZE);
> > +        } else {
> 
> What is the void ptr doing there?

It's stray debug code that I accidentally left there, I think I mentioned 
it on irc the other day that I had cleaned it up locally.

> I think the code needs some length-checks, there's some possible
> buffer overreads (and possible overwrites as a result of that in the
> memcpy()s).

I've done a lot of improvments regarding such things compared to your 
version that I started from - I'm quite confident with this version 
actually. It passes valgrind without any warnings or leaks.

Updated version attached.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-RTP-depacketization-of-the-X-QT-QuickTime-format.patch
Type: text/x-diff
Size: 13204 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101006/f03c90f7/attachment.patch>



More information about the ffmpeg-devel mailing list