summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--ext/dv/gstdvdemux.c21
2 files changed, 21 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 19cec899..2f4fda6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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>
* configure.ac:
@@ -328,6 +333,11 @@
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
license info in the source code -- was only in the commit log
before.
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index 7ebe9aef..77ab23ed 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -779,9 +779,8 @@ gst_dvdemux_demux_video (GstDVDemux * dvdemux, const guint8 * data)
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);
+ outbuf->malloc_data = GST_BUFFER_DATA (outbuf);
GST_BUFFER_TIMESTAMP (outbuf) = dvdemux->timestamp;
GST_BUFFER_OFFSET (outbuf) = dvdemux->video_offset;
@@ -821,11 +820,15 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, const guint8 * data)
dvdemux->timestamp = dvdemux->start_timestamp;
- format = GST_FORMAT_TIME;
- if (!(res = gst_pad_query_convert (dvdemux->sinkpad,
- GST_FORMAT_BYTES,
- dvdemux->stop_byte, &format, &dvdemux->stop_timestamp))) {
- goto discont_error;
+ if (dvdemux->stop_byte == -1) {
+ dvdemux->stop_timestamp = -1;
+ } else {
+ format = GST_FORMAT_TIME;
+ if (!(res = gst_pad_query_convert (dvdemux->sinkpad,
+ GST_FORMAT_BYTES,
+ dvdemux->stop_byte, &format, &dvdemux->stop_timestamp))) {
+ goto discont_error;
+ }
}
event = gst_event_new_newsegment (1.0, GST_FORMAT_TIME,
@@ -897,13 +900,11 @@ gst_dvdemux_flush (GstDVDemux * dvdemux)
/* if we still have enough for a frame, start decoding */
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 */
ret = gst_dvdemux_demux_frame (dvdemux, data);
- gst_adapter_flush (dvdemux->adapter, length);
-
if (ret != GST_FLOW_OK)
goto done;
}