After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301717 - [PATCH] ffenc_mpeg4 segfaults in _get_caps
[PATCH] ffenc_mpeg4 segfaults in _get_caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal critical
: 0.8.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-23 15:45 UTC by Luca Ognibene
Modified: 2005-04-23 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't call avcodec_close if avcodec_open fails (602 bytes, patch)
2005-04-23 15:46 UTC, Luca Ognibene
none Details | Review

Description Luca Ognibene 2005-04-23 15:45:27 UTC
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
    at utils.c line 150
  • #1 ff_rate_control_uninit
    at ratecontrol.c line 183
  • #2 MPV_encode_end
    at mpegvideo.c line 1310
  • #3 avcodec_close
    at utils.c line 626
  • #4 gst_ffmpegenc_getcaps
    at gstffmpegenc.c line 337
  • #5 gst_pad_get_caps
    at gstpad.c line 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 :) )
Comment 1 Luca Ognibene 2005-04-23 15:46:25 UTC
Created attachment 45590 [details] [review]
don't call avcodec_close if avcodec_open fails
Comment 2 Ronald Bultje 2005-04-23 16:07:38 UTC
applied, thakns.