mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
ext/ffmpeg/gstffmpegdec.c: Bump the priority of VC1 decoder so that it goes before the WMV3 decoder. This allows prop...
Original commit message from CVS: * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps), (gst_ffmpegdec_video_frame), (gst_ffmpegdec_register): Bump the priority of VC1 decoder so that it goes before the WMV3 decoder. This allows proper auto-pluggin with decodebin/playbin. Fixes #531857
This commit is contained in:
parent
d6934dcd7c
commit
11f80ecdc6
2 changed files with 25 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-05-07 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||
|
||||
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps),
|
||||
(gst_ffmpegdec_video_frame), (gst_ffmpegdec_register):
|
||||
Bump the priority of VC1 decoder so that it goes before the WMV3
|
||||
decoder. This allows proper auto-pluggin with decodebin/playbin.
|
||||
Fixes #531857
|
||||
|
||||
2008-05-06 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||
|
||||
Patch by: Gabriel Bouvigne <bouvigne at mp3-tech dot org>
|
||||
|
|
|
@ -612,6 +612,19 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
|
|||
|
||||
GST_OBJECT_LOCK (ffmpegdec);
|
||||
|
||||
/* stupid check for VC1 */
|
||||
if (oclass->in_plugin->id == CODEC_ID_WMV3) {
|
||||
enum CodecID cid;
|
||||
|
||||
/* Get the code id and check it's the same as the incoming caps */
|
||||
cid = gst_ffmpeg_caps_to_codecid (caps, NULL);
|
||||
if (cid != CODEC_ID_WMV3) {
|
||||
ret = FALSE;
|
||||
GST_WARNING ("This decoder handles WMV3 and not VC1!");
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* close old session */
|
||||
gst_ffmpegdec_close (ffmpegdec);
|
||||
|
||||
|
@ -1504,8 +1517,7 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
|
|||
* ffmpeg timestamp and the interpollated next timestamp invalid. */
|
||||
out_pts = -1;
|
||||
ffmpegdec->next_ts = -1;
|
||||
}
|
||||
else
|
||||
} else
|
||||
ffmpegdec->last_out = out_pts;
|
||||
|
||||
if (ffmpegdec->ts_is_dts) {
|
||||
|
@ -2526,6 +2538,9 @@ gst_ffmpegdec_register (GstPlugin * plugin)
|
|||
case CODEC_ID_MPEG2VIDEO:
|
||||
rank = GST_RANK_NONE;
|
||||
break;
|
||||
case CODEC_ID_VC1:
|
||||
rank = GST_RANK_MARGINAL + 1;
|
||||
break;
|
||||
default:
|
||||
rank = GST_RANK_MARGINAL;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue