[Bug 726814] avvidenc: Fix leak of AVBufferRef

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Apr 29 00:04:59 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=726814
  GStreamer | gst-libav | git

--- Comment #5 from Stian Selnes <stian.selnes at gmail.com> 2014-04-29 07:04:53 UTC ---
Before returning from avcodec_encode_video2() there is the following code:

    if (ret < 0 || !*got_packet_ptr)
        av_free_packet(avpkt);

which is logically the same as that test in the element. We should not call
av_packet_unref() after this and it looks like the memory is freed correctly.

I agree it's slightly confusing to assume such behavior, but should be OK since
it's also described in the documentation of avcodec_encode_video2().

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list