[FFmpeg-devel] [Patch] Fix for static leaks in h264.c
Wed Jun 25 18:17:52 CEST 2008
On Wed, Jun 25, 2008 at 10:11 AM, Art Clarke <aclarke at vlideshow.com> wrote:
> On Wed, Jun 25, 2008 at 10:06 AM, Art Clarke <aclarke at vlideshow.com>
>> On Wed, Jun 25, 2008 at 9:43 AM, Art Clarke <aclarke at vlideshow.com>
>>> Assuming I'm right in my analysis (always a dicey assumption) let me know
>>> which you'd prefer of the following two choices:
>>> Choice A: Simpler code but waste some stack space.
>>> Choice B: More complex code but be as efficient as possible with stack
>>> I'll adjust the patch accordingly if you choose Choice B.
>>> - Art
>> Attached is my patch for Choice B. I think it's more complicated to
>> understand, but is efficient with DATA SEGMENT (yes, I know not stack...
>> sorry) space.
>> - Art
> Scratch that. I jumped the gun on that (didn't wait for a long-running
> test to finish) and it fails with the Choice B patch. Let me figure that
> out, and I'll resubmit a choice B patch later.
> - Art
OK, here is my proposed Choice B (which I imagine Michael that you'll pick):
Same as Choice A (i.e. now we have a INIT_VLC_STATIC_WITH_TABLE) except:
- The varying static array is now a fully packed array (no wasted space).
- We compute offsets dynamically while initializing it based on the
- We do one assert at the end of initialization to catch any "stupid
programmer bugs" like when I mistyped an offset in prior change.
This passes 100% of Vlideshow tests on h264-encoded video files. All
resulting audio and video sounds and looks correct.
This passes 100% of ffmpeg regression tests (make fulltest) when run on
Fedora 7 static builds (which is the only way regression tests pass at all
There are no new log messages showing up.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel