mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +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;
|
res = TRUE;
|
||||||
/* FIXME, use source pad */
|
/* FIXME, use source pad */
|
||||||
if (cur_type != GST_SEEK_TYPE_NONE && cur != -1)
|
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)
|
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)
|
if (!res)
|
||||||
goto no_format;
|
goto no_format;
|
||||||
|
|
||||||
|
@ -818,7 +818,7 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
|
||||||
|
|
||||||
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
||||||
seekable = demux->seekable;
|
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 */
|
/* unlikely that we don't know duration but can seek */
|
||||||
seekable = FALSE;
|
seekable = FALSE;
|
||||||
dur = -1;
|
dur = -1;
|
||||||
|
|
|
@ -204,14 +204,13 @@ gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence)
|
||||||
case AVSEEK_SIZE:
|
case AVSEEK_SIZE:
|
||||||
/* ffmpeg wants to know the current end position in bytes ! */
|
/* ffmpeg wants to know the current end position in bytes ! */
|
||||||
{
|
{
|
||||||
GstFormat format = GST_FORMAT_BYTES;
|
|
||||||
gint64 duration;
|
gint64 duration;
|
||||||
|
|
||||||
GST_DEBUG ("Seek end");
|
GST_DEBUG ("Seek end");
|
||||||
|
|
||||||
if (gst_pad_is_linked (info->pad))
|
if (gst_pad_is_linked (info->pad))
|
||||||
if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
|
if (gst_pad_query_duration (GST_PAD_PEER (info->pad),
|
||||||
&duration))
|
GST_FORMAT_BYTES, &duration))
|
||||||
newpos = ((guint64) duration) + pos;
|
newpos = ((guint64) duration) + pos;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue