mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
ffmpeg: fix for query API changes
This commit is contained in:
parent
b507d2e013
commit
8a3014f2fa
2 changed files with 5 additions and 6 deletions
|
@ -540,9 +540,9 @@ gst_ffmpegdemux_perform_seek (GstFFMpegDemux * demux, GstEvent * event)
|
|||
res = TRUE;
|
||||
/* FIXME, use source pad */
|
||||
if (cur_type != GST_SEEK_TYPE_NONE && cur != -1)
|
||||
res = gst_pad_query_convert (demux->sinkpad, format, cur, &fmt, &cur);
|
||||
res = gst_pad_query_convert (demux->sinkpad, format, cur, fmt, &cur);
|
||||
if (res && stop_type != GST_SEEK_TYPE_NONE && stop != -1)
|
||||
res = gst_pad_query_convert (demux->sinkpad, format, stop, &fmt, &stop);
|
||||
res = gst_pad_query_convert (demux->sinkpad, format, stop, fmt, &stop);
|
||||
if (!res)
|
||||
goto no_format;
|
||||
|
||||
|
@ -818,7 +818,7 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
|
|||
|
||||
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
||||
seekable = demux->seekable;
|
||||
if (!gst_pad_query_duration (pad, &format, &dur)) {
|
||||
if (!gst_pad_query_duration (pad, format, &dur)) {
|
||||
/* unlikely that we don't know duration but can seek */
|
||||
seekable = FALSE;
|
||||
dur = -1;
|
||||
|
|
|
@ -204,14 +204,13 @@ gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence)
|
|||
case AVSEEK_SIZE:
|
||||
/* ffmpeg wants to know the current end position in bytes ! */
|
||||
{
|
||||
GstFormat format = GST_FORMAT_BYTES;
|
||||
gint64 duration;
|
||||
|
||||
GST_DEBUG ("Seek end");
|
||||
|
||||
if (gst_pad_is_linked (info->pad))
|
||||
if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
|
||||
&duration))
|
||||
if (gst_pad_query_duration (GST_PAD_PEER (info->pad),
|
||||
GST_FORMAT_BYTES, &duration))
|
||||
newpos = ((guint64) duration) + pos;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue