summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2006-05-26 13:16:54 +0000
committerEdward Hervey <bilboed@bilboed.com>2006-05-26 13:16:54 +0000
commit0efacd5ccb4961b180d2a493d04bb80f8186841d (patch)
treecb3afa580a3e6c954c39ede5a18edb03e19e6e9e
parentc27e1fcaadca11e898821840c6214de9436fcfba (diff)
downloadgst-plugins-bad-0efacd5ccb4961b180d2a493d04bb80f8186841d.tar.gz
gst-plugins-bad-0efacd5ccb4961b180d2a493d04bb80f8186841d.tar.bz2
gst-plugins-bad-0efacd5ccb4961b180d2a493d04bb80f8186841d.zip
gst/qtdemux/qtdemux.c: Clip the outputed NEWSEGMENT stop time to the configured segment stop time.
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_activate_segment): Clip the outputed NEWSEGMENT stop time to the configured segment stop time.
-rw-r--r--ChangeLog6
-rw-r--r--gst/qtdemux/qtdemux.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4db57d1a..520ef5f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-26 Edward Hervey <edward@fluendo.com>
+
+ * gst/qtdemux/qtdemux.c: (gst_qtdemux_activate_segment):
+ Clip the outputed NEWSEGMENT stop time to the configured segment stop
+ time.
+
2006-05-26 Wim Taymans <wim@fluendo.com>
* gst/qtdemux/qtdemux.c: (gst_qtdemux_do_seek):
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index cec5793e..2510a859 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -1066,7 +1066,10 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
/* calc media start/stop */
start = segment->media_start + seg_time;
- stop = segment->media_stop;
+ if (qtdemux->segment.stop == -1)
+ stop = segment->media_stop;
+ else
+ stop = MIN (segment->media_stop, qtdemux->segment.stop);
GST_DEBUG_OBJECT (qtdemux, "newsegment %d from %" GST_TIME_FORMAT
" to %" GST_TIME_FORMAT ", time %" GST_TIME_FORMAT, seg_idx,
@@ -3482,8 +3485,10 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
samples[j].chunk = j;
samples[j].offset = chunk_offset;
- samples[j].size = (samples_per_chunk * stream->n_channels) /
- stream->samples_per_frame * stream->bytes_per_frame;
+ if (stream->samples_per_frame * stream->bytes_per_frame) {
+ samples[j].size = (samples_per_chunk * stream->n_channels) /
+ stream->samples_per_frame * stream->bytes_per_frame;
+ }
GST_INFO_OBJECT (qtdemux, "sample %d: timestamp %" GST_TIME_FORMAT
", size %u", j, GST_TIME_ARGS (timestamp), samples[j].size);