[Bug 697806] avdec_h264 Fails during error recovery after packet loss leading to stream corruption

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Oct 16 15:48:08 CEST 2013


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

--- Comment #16 from tcdgreenwood at hotmail.com 2013-10-16 13:47:59 UTC ---
Created an attachment (id=257422)
 View: https://bugzilla.gnome.org/attachment.cgi?id=257422
 Review: https://bugzilla.gnome.org/review?bug=697806&attachment=257422

Patch that applies to 1.2.0

I have made a new patch appropriate for 1.2.0.  Unfortunately my original plan
for moving to get_buffer2 cannot be done as that didn't make it into libav 9,
but the original patch created for 1.0 stream wouldn't quite work either.

For a while I couldn't work out how to make this work as when packet loss is
encountered libav now requests multiple buffers for each frame - meaning we
have nowhere to store the GstFFMpegVidDecVideoFrame.  In the end I realised
that the buffers were allocated and deallocated in order so when multiple
buffers are requested the current buffer can be stored as a pointer within the
newly allocated one.  During the release call it's restored.

I have tested this and checked that release/get calls are matched and as far as
I can tell this is always releasing the memory even during packet loss tests.

It's important to note that the libav buffer allocation semantics are slightly
different for some of the audio decoding methods, please don't apply the same
change for audio.

-- 
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