mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
flvdemux: fix seeking
Which I accidentally broke when fixing flv videos breaking on spurious timestamp discontinuities in broken files. https://bugzilla.gnome.org/show_bug.cgi?id=631430
This commit is contained in:
parent
ebefb140b9
commit
21d3faa400
1 changed files with 7 additions and 7 deletions
|
@ -763,10 +763,10 @@ gst_flv_demux_push_tags (GstFlvDemux * demux)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_flv_demux_update_resync (GstFlvDemux * demux, guint32 pts, guint32 * last,
|
||||
GstClockTime * offset)
|
||||
gst_flv_demux_update_resync (GstFlvDemux * demux, guint32 pts, gboolean discont,
|
||||
guint32 * last, GstClockTime * offset)
|
||||
{
|
||||
if (ABS (pts - *last) >= RESYNC_THRESHOLD) {
|
||||
if (!discont && ABS (pts - *last) >= RESYNC_THRESHOLD) {
|
||||
/* Theoretically, we should use substract the duration of the last buffer,
|
||||
but this demuxer sends no durations on buffers, not sure if it cannot
|
||||
know, or just does not care to calculate. */
|
||||
|
@ -966,8 +966,8 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
/* detect (and deem to be resyncs) large pts gaps */
|
||||
gst_flv_demux_update_resync (demux, pts, &demux->last_audio_pts,
|
||||
&demux->audio_time_offset);
|
||||
gst_flv_demux_update_resync (demux, pts, demux->audio_need_discont,
|
||||
&demux->last_audio_pts, &demux->audio_time_offset);
|
||||
|
||||
/* Fill buffer with data */
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = pts * GST_MSECOND + demux->audio_time_offset;
|
||||
|
@ -1338,8 +1338,8 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
/* detect (and deem to be resyncs) large pts gaps */
|
||||
gst_flv_demux_update_resync (demux, pts, &demux->last_video_pts,
|
||||
&demux->video_time_offset);
|
||||
gst_flv_demux_update_resync (demux, pts, demux->video_need_discont,
|
||||
&demux->last_video_pts, &demux->video_time_offset);
|
||||
|
||||
/* Fill buffer with data */
|
||||
GST_BUFFER_TIMESTAMP (outbuf) = pts * GST_MSECOND + demux->video_time_offset;
|
||||
|
|
Loading…
Reference in a new issue