GNOME Bugzilla – Bug 757575
gstbaseparse buf DISCONT issue
Last modified: 2018-11-03 12:30:38 UTC
When we are update gstreamer from 1.4.5 to 1.6, we found some clips with mp3 audio cannot be played. So we have a check and found that in gstbaseparse, there may be some modification can be made. In gstbaseparse, The chain in buffer is pushed into adapter, and then send to subclass by tmpbuf (gstbuffer) frame by frame. There is a commit which use new API to get buffer from adapter. commit c3bcbadd5452d5b3450f70e49dad3e64f14de00a Author: Sebastian Dr枚ge <sebastian@centricular.com> Date: Tue Jun 30 11:18:24 2015 +0200 baseparse: Use new gst_adapter_get_buffer() API instead of gst_adapter_map() This preserves GstMeta properly unless the subclass does special things and The gst_adapter_get_buffer() will preserve all meta in adapter including GST_BUFFER_FLAG_DISCONT flag. So if the first chain in buffer contains several frames, these several frames will be sent to downstream with DISCONT flag. However, the DISCONT flag is only needed for the first frame push to downstream, if the 2nd frame (and after 2nd frame) includes DISCONT flag, then audiodecoder may do flush operation, and which can make audio decoder subclass can not get enough data.
Created attachment 314800 [details] [review] patch to unset discont flag before push to adapter Since the DISCONT flag can be handled by priv->discont flag. There is no need to pass DISCONT flag to adapter. So a possible way for this issue is to unset buffer DISCONT flag before gst_adapter_push() Please see attached patch.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/137.