[Bug 765807] dvdlpcmdec: rewrite with GstAudioDecoder and add new format

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jul 15 12:58:04 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765807

--- Comment #12 from Michael Olbrich <m.olbrich at pengutronix.de> ---
(In reply to Sebastian Dröge (slomo) from comment #8)
> Review of attachment 327021 [details] [review]:
> 
> Generally looks good, thanks! Good work
> 
> ::: gst/dvdlpcmdec/gstdvdlpcmdec.c
> @@ +544,3 @@
>    channels = GST_AUDIO_INFO_CHANNELS (&dvdlpcmdec->info);
>  
> +  gst_buffer_ref (buf);
> 
> Why? Please make sure it is unreffed in all cases, but this seems
> unnecessary? The base class keeps track of that for you

That's because of the new base class. This code was the pad chain function so
it owned the buffer. With the new base class it's in handle_frame which does
not own the buffer.
There are cases where the buffer is passed to gst_audio_decoder_finish_frame()
because there is nothing to do. In all other cases the buffer is eventually
unrefed again.
I can change this to only ref the buffer if necessary. Maybe that will be
clearer.

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