From 8a3014f2fa5f26da1ab6abda832f19c26176fcd8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 29 Jul 2011 12:32:45 +0200 Subject: [PATCH] ffmpeg: fix for query API changes --- ext/ffmpeg/gstffmpegdemux.c | 6 +++--- ext/ffmpeg/gstffmpegprotocol.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c index 4ac21f02a4..ca8f0e72f8 100644 --- a/ext/ffmpeg/gstffmpegdemux.c +++ b/ext/ffmpeg/gstffmpegdemux.c @@ -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; diff --git a/ext/ffmpeg/gstffmpegprotocol.c b/ext/ffmpeg/gstffmpegprotocol.c index efad2c8e2e..aabfe44c60 100644 --- a/ext/ffmpeg/gstffmpegprotocol.c +++ b/ext/ffmpeg/gstffmpegprotocol.c @@ -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;