[Bug 740458] hlsdemux: typefind might fail if first buffer is too short, causing the whole pipeline to abort

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Nov 21 14:12:13 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=740458
  GStreamer | gst-plugins-bad | 1.4.0

Thiago Sousa Santos <thiagossantos> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #291209|none                        |needs-work
             status|                            |

--- Comment #7 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-11-21 22:12:09 UTC ---
Review of attachment 291209:
 --> (https://bugzilla.gnome.org/review?bug=740458&attachment=291209)

I still have some suggestions below. The commit message is better now but title
can be shorter, just use "hlsdemux: typefind might fail if first buffer is too
short"

Thanks for the quick update!

::: ext/hls/gsthlsdemux.c
@@ +923,3 @@
     if (G_UNLIKELY (!caps)) {
+      /* Typefind could fail if buffer is too small. Retry later */
+      if (G_UNLIKELY(gst_buffer_get_size(buffer) < 1024)) {

Use a larger value here, as this is a corner case we can just give typefind
enough data. Quickly browsing through typefinders code shows some requiring
2MB.

@@ +926,3 @@
+        gst_buffer_prepend_memory(demux->pending_buffer, 
+                                  gst_buffer_get_all_memory(buffer));
+        gst_buffer_unref(buffer);

gst_buffer_append does what those 2 lines do.

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