mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
parent
c927264622
commit
7877ffb6f5
2 changed files with 6 additions and 1 deletions
|
@ -488,6 +488,7 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
|
|||
qtdemux->adapter = gst_adapter_new ();
|
||||
qtdemux->offset = 0;
|
||||
qtdemux->first_mdat = -1;
|
||||
qtdemux->got_moov = FALSE;
|
||||
qtdemux->mdatoffset = GST_CLOCK_TIME_NONE;
|
||||
qtdemux->mdatbuffer = NULL;
|
||||
gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
|
||||
|
@ -1675,6 +1676,7 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
|
|||
qtdemux->posted_redirect = FALSE;
|
||||
qtdemux->offset = 0;
|
||||
qtdemux->first_mdat = -1;
|
||||
qtdemux->got_moov = FALSE;
|
||||
qtdemux->mdatoffset = GST_CLOCK_TIME_NONE;
|
||||
if (qtdemux->mdatbuffer)
|
||||
gst_buffer_unref (qtdemux->mdatbuffer);
|
||||
|
@ -3177,6 +3179,8 @@ gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf)
|
|||
if (fourcc == FOURCC_moov) {
|
||||
GST_DEBUG_OBJECT (demux, "Parsing [moov]");
|
||||
|
||||
demux->got_moov = TRUE;
|
||||
|
||||
qtdemux_parse_moov (demux, data, demux->neededbytes);
|
||||
qtdemux_node_dump (demux, demux->moov_node);
|
||||
qtdemux_parse_tree (demux);
|
||||
|
@ -3216,7 +3220,7 @@ gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf)
|
|||
GST_DEBUG_OBJECT (demux, "Carrying on normally");
|
||||
gst_adapter_flush (demux->adapter, demux->neededbytes);
|
||||
|
||||
if (demux->first_mdat != -1) {
|
||||
if (demux->got_moov && demux->first_mdat != -1) {
|
||||
gboolean res;
|
||||
|
||||
/* we need to seek back */
|
||||
|
|
|
@ -88,6 +88,7 @@ struct _GstQTDemux {
|
|||
/* offset of the mdat atom */
|
||||
guint64 mdatoffset;
|
||||
guint64 first_mdat;
|
||||
gboolean got_moov;
|
||||
|
||||
GstTagList *tag_list;
|
||||
|
||||
|
|
Loading…
Reference in a new issue