[gstreamer-bugs] [Bug 301717] New: [PATCH] ffenc_mpeg4 segfaults in _get_caps

bugzilla-daemon at bugzilla.gnome.org bugzilla-daemon at bugzilla.gnome.org
Sat Apr 23 08:45:27 PDT 2005


Please DO NOT reply to this by email. All additional comments should be made in
the comments box of this bug report.

 http://bugzilla.gnome.org/show_bug.cgi?id=301717
 GStreamer | gst-ffmpeg | Ver: HEAD CVS

           Summary: [PATCH] ffenc_mpeg4 segfaults in _get_caps
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: Normal
         Component: gst-ffmpeg
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: luogni at tin.it
         QAContact: gstreamer-bugs at lists.sourceforge.net
                CC: all-bugs at bugzilla.gnome.org


With current cvs try:
gst-launch-0.8 videotestsrc !
video/x-raw-yuv,width=640,height=480,framerate=25.0 ! ffenc_mpeg4 ! avimux !
filesink location="file.avi"
I get a segfault with this backtrace:
#0  av_freep (arg=0x1788) at utils.c:150
#1  0xb7731731 in ff_rate_control_uninit (s=0x0) at ratecontrol.c:183
#2  0xb7622eeb in MPV_encode_end (avctx=0x81690e0) at mpegvideo.c:1310
#3  0xb761de77 in avcodec_close (avctx=0x81690e0) at utils.c:626
#4  0xb75d185a in gst_ffmpegenc_getcaps (pad=0x80c01a0) at gstffmpegenc.c:337
#5  0xb7efe863 in gst_pad_get_caps (pad=0x80c01a0) at gstpad.c:2709

The attached patch seems to fix it. It just call avcodec_close only when
avcodec_open is successfull. I've tested it with valgrind and there are no
memleaks (or so valgrind tells me :) )

------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.




More information about the Gstreamer-bugs mailing list