[Bug 774566] matroskaparse: error out on last buffer

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Nov 18 16:09:50 UTC 2016


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #340161|none                        |reviewed
             status|                            |

--- Comment #16 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 340161:
 --> (https://bugzilla.gnome.org/review?bug=774566&attachment=340161)

Goes in the right direction I think

::: gst/matroska/matroska-parse.c
@@ +3021,2 @@
       ret = GST_FLOW_EOS;
+      return ret;

Don't you always want to return EOS here in that case?

@@ +3031,3 @@
+      gint64 bytes_scanned;
+      gint read_state;
+      const guint max_threshold = 64 * 1024;    // same value used in
gst_matroska_demux_search_cluster

No C99 comments

@@ +3034,3 @@
+      length = 0;
+      if (parse->common.start_resync_offset == -1) {
+        parse->common.start_resync_offset = parse->common.offset;

Needs the reset, yes

@@ +3046,3 @@
+        parse->common.state = GST_MATROSKA_READ_STATE_SCANNING;
+        ret = gst_matroska_parse_parse_id (parse, id, length, needed);
+        parse->common.state = read_state;

I don't understand this :) Why don't you just set state=SCANNING, return from
everywhere here and let the outer code that calls gst_matroska_parse_parse_id()
take care of calling all these things again?

Also why the custom scanning at all here?

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