mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
mpegpsdemux: don't scan for the last PTS if the first wasn't found
This commit is contained in:
parent
44862ac067
commit
0961e2f494
1 changed files with 10 additions and 7 deletions
|
@ -2543,13 +2543,16 @@ gst_flups_sink_get_duration (GstFluPSDemux * demux)
|
||||||
" in packet starting at %" G_GUINT64_FORMAT,
|
" in packet starting at %" G_GUINT64_FORMAT,
|
||||||
demux->first_pts, GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->first_pts)),
|
demux->first_pts, GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->first_pts)),
|
||||||
offset);
|
offset);
|
||||||
/* scan for last PTS in the stream */
|
if (demux->first_pts != G_MAXUINT64) {
|
||||||
offset = demux->sink_segment.stop;
|
/* scan for last PTS in the stream */
|
||||||
gst_flups_demux_scan_backward_ts (demux, &offset, SCAN_PTS, &demux->last_pts);
|
offset = demux->sink_segment.stop;
|
||||||
GST_DEBUG_OBJECT (demux, "Last PTS: %" G_GINT64_FORMAT " %" GST_TIME_FORMAT
|
gst_flups_demux_scan_backward_ts (demux, &offset, SCAN_PTS,
|
||||||
" in packet starting at %" G_GUINT64_FORMAT,
|
&demux->last_pts);
|
||||||
demux->last_pts, GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->last_pts)),
|
GST_DEBUG_OBJECT (demux,
|
||||||
offset);
|
"Last PTS: %" G_GINT64_FORMAT " %" GST_TIME_FORMAT
|
||||||
|
" in packet starting at %" G_GUINT64_FORMAT, demux->last_pts,
|
||||||
|
GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->last_pts)), offset);
|
||||||
|
}
|
||||||
/* Detect wrong SCR values */
|
/* Detect wrong SCR values */
|
||||||
if (demux->first_scr > demux->last_scr) {
|
if (demux->first_scr > demux->last_scr) {
|
||||||
GST_DEBUG_OBJECT (demux, "Wrong SCR values detected, searching for "
|
GST_DEBUG_OBJECT (demux, "Wrong SCR values detected, searching for "
|
||||||
|
|
Loading…
Reference in a new issue