Motion - Bug Report 2006x 01x 12x 120335

BUG: superfluous free in ffmpeg.c

i now this is contrary or another but report recently made but when running motion in the forgound I got error messages from free()

when I turned on debugging for malloc so free will abort on error with a core file i tracked the the erroneous free to ffmpeg.c at line 465

    free(ffmpeg->c);

being ffmpeg->c is never malloc'ed but is a pointer into another struct

thus should perhaps be replaced with


#if LIBAVFORMAT_BUILD < 4629
    free(ffmpeg->c);
#endif

as based on the #define for AVSTREAM_CODEC_PTR at line 56 in the same file.

Test case

Environment

Motion version: 3.2.4
ffmpeg version: ffmpeg 0.4.9
Shared libraries: ffmpeg
Server OS: FreeBSD 5.3-RELEASE-p5

-- EvilPete - 12 Jan 2006

Follow up

Thanks , but the #ifdef should be LIBAVFORMAT_BUILD >= 4629 instead .

-- AngelCarpintero - 13 Jan 2006

Fix record

There's attached a patch to solve that problem that happens in FreeBSD and Debian Sarge because the version of ffmpeg is LIBAVFORMAT_BUILD < 4629.

NOTE: this patch is included in http://www.lavrsen.dk/twiki/bin/view/Motion/FixStringsAndDisableLabeling

-- AngelCarpintero - 13 Jan 2006

In 3.2.6

-- KennethLavrsen - 20 Oct 2006
Topic revision: r7 - 20 Oct 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.