Commit 7cc995f7 authored by Andy Wingo Wingo's avatar Andy Wingo Wingo
Browse files

ext/dv/gstdvdemux.c (gst_dvdemux_demux_frame): Send out valid segment end timestamps.

Original commit message from CVS:
2005-08-24  Andy Wingo  <wingo@pobox.com>

* ext/dv/gstdvdemux.c (gst_dvdemux_demux_frame): Send out valid
segment end timestamps.

(Also commit an old changelog entry)
parent 122cdbe8
2005-08-24 Andy Wingo <wingo@pobox.com>
* ext/dv/gstdvdemux.c (gst_dvdemux_demux_frame): Send out valid
segment end timestamps.
2005-08-24 Thomas Vander Stichele <thomas at apestaart dot org> 2005-08-24 Thomas Vander Stichele <thomas at apestaart dot org>
   
* configure.ac: * configure.ac:
...@@ -328,6 +333,11 @@ ...@@ -328,6 +333,11 @@
   
2005-08-16 Andy Wingo <wingo@pobox.com> 2005-08-16 Andy Wingo <wingo@pobox.com>
   
* ext/dv/gstdvdemux.c (gst_dvdemux_flush): Use gst_adapter_take so
we have our own copy of the data.
(gst_dvdemux_demux_video): Set the take() data as malloc_data so
it will get freed later.
* ext/raw1394/gstdv1394src.c (gst_dv1394src_iso_receive): Note * ext/raw1394/gstdv1394src.c (gst_dv1394src_iso_receive): Note
license info in the source code -- was only in the commit log license info in the source code -- was only in the commit log
before. before.
......
...@@ -779,9 +779,8 @@ gst_dvdemux_demux_video (GstDVDemux * dvdemux, const guint8 * data) ...@@ -779,9 +779,8 @@ gst_dvdemux_demux_video (GstDVDemux * dvdemux, const guint8 * data)
outbuf = gst_buffer_new (); outbuf = gst_buffer_new ();
/* won't get freed, but still callers should not hold a ref on the buffer --
need to figure out how to do that in gst core */
gst_buffer_set_data (outbuf, (guint8 *) data, dvdemux->frame_len); gst_buffer_set_data (outbuf, (guint8 *) data, dvdemux->frame_len);
outbuf->malloc_data = GST_BUFFER_DATA (outbuf);
GST_BUFFER_TIMESTAMP (outbuf) = dvdemux->timestamp; GST_BUFFER_TIMESTAMP (outbuf) = dvdemux->timestamp;
GST_BUFFER_OFFSET (outbuf) = dvdemux->video_offset; GST_BUFFER_OFFSET (outbuf) = dvdemux->video_offset;
...@@ -821,12 +820,16 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, const guint8 * data) ...@@ -821,12 +820,16 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, const guint8 * data)
dvdemux->timestamp = dvdemux->start_timestamp; dvdemux->timestamp = dvdemux->start_timestamp;
if (dvdemux->stop_byte == -1) {
dvdemux->stop_timestamp = -1;
} else {
format = GST_FORMAT_TIME; format = GST_FORMAT_TIME;
if (!(res = gst_pad_query_convert (dvdemux->sinkpad, if (!(res = gst_pad_query_convert (dvdemux->sinkpad,
GST_FORMAT_BYTES, GST_FORMAT_BYTES,
dvdemux->stop_byte, &format, &dvdemux->stop_timestamp))) { dvdemux->stop_byte, &format, &dvdemux->stop_timestamp))) {
goto discont_error; goto discont_error;
} }
}
event = gst_event_new_newsegment (1.0, GST_FORMAT_TIME, event = gst_event_new_newsegment (1.0, GST_FORMAT_TIME,
dvdemux->start_timestamp, dvdemux->stop_timestamp, 0); dvdemux->start_timestamp, dvdemux->stop_timestamp, 0);
...@@ -897,13 +900,11 @@ gst_dvdemux_flush (GstDVDemux * dvdemux) ...@@ -897,13 +900,11 @@ gst_dvdemux_flush (GstDVDemux * dvdemux)
/* if we still have enough for a frame, start decoding */ /* if we still have enough for a frame, start decoding */
if (gst_adapter_available (dvdemux->adapter) >= length) { if (gst_adapter_available (dvdemux->adapter) >= length) {
data = gst_adapter_peek (dvdemux->adapter, length); data = gst_adapter_take (dvdemux->adapter, length);
/* and decode the data */ /* and decode the data */
ret = gst_dvdemux_demux_frame (dvdemux, data); ret = gst_dvdemux_demux_frame (dvdemux, data);
gst_adapter_flush (dvdemux->adapter, length);
if (ret != GST_FLOW_OK) if (ret != GST_FLOW_OK)
goto done; goto done;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment