[Live-devel] H264FUAFragmenter glibc error

Jarvis, M. Simon mjarvis at draper.com
Wed Sep 23 06:18:45 PDT 2009


Hi Ross,

Thanks for your input.

I also thought it was probably the "double free", but it turned out I
was writing beyond the allocated input buffer(fInputBuffer) size.  I
thought I was limiting the memcpy() to the fInputBufferSize, but in fact
was not, and occasionally my H.264 encoder is producing a buffer larger
than the H264FUAFragmenter allocated size.  

So now having tracked down the problem, the question is what to do about
it?  I think I have two choices, and would value your opinion here.
1. Increase the H264FUAFragmenter fInputBufferSize to accommodate my
largest Encoder output or
2. put in some encoder output buffer overflow management code.

I think the easier of the two is 1, as long as I don't run into memory
limitations in my embedded environment. Are there any issues that you
can think of with going this way?  Was there any reason the
fInputBufferSize is set to OutPacketBuffer::maxSize, which is hard coded
to 60,000?  Implications of increasing this?

I could hard code a new fInputBufferSize just for the H264FUAFragmenter
object instead of changing/using OutPacketBuffer::maxSize?

Thanks again for your input.

simon

-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Tuesday, September 22, 2009 6:36 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] H264FUAFragmenter glibc error

>~H264FUAFragmenter()
>fInputBuffer = 0xfcbb0
>*** glibc detected *** ./cap_encode_omap3530.x470MV: double free or
corruption

I suspect that "double free" is really the problem.  You should check 
to make sure that "~H264VideoRTPSink()" isn't being called more than 
once on the same object.

You should also check that "OutPacketBuffer::maxSize" is a reasonable 
value (in particular, non-zero), because that's what gets used for 
the "fInputBuffer" size.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


More information about the live-devel mailing list