ext/ffmpeg/gstffmpegdec.c: Previous commit in fact broke playback for standard wmv3.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps),
(gst_ffmpegdec_register):
Previous commit in fact broke playback for standard wmv3.
Instead make both ffdec_vc1 and ffdec_wmv3 accept any wmv3 variant and
figure out the proper codecid when opening the ffmpeg decoder.
This commit is contained in:
Edward Hervey 2008-05-07 10:15:53 +00:00
parent 11f80ecdc6
commit 221bcf6f97
3 changed files with 12 additions and 15 deletions

View file

@ -1,3 +1,11 @@
2008-05-07 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps),
(gst_ffmpegdec_register):
Previous commit in fact broke playback for standard wmv3.
Instead make both ffdec_vc1 and ffdec_wmv3 accept any wmv3 variant and
figure out the proper codecid when opening the ffmpeg decoder.
2008-05-07 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps),

2
common

@ -1 +1 @@
Subproject commit 9b28214399156457fd6b43d0604a47e4bdf19c28
Subproject commit ba3dd2882b1611f8115f9664e3b85e1fd956b53d

View file

@ -613,17 +613,9 @@ 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;
}
}
if ((oclass->in_plugin->id == CODEC_ID_WMV3) ||
(oclass->in_plugin->id == CODEC_ID_VC1))
oclass->in_plugin->id = gst_ffmpeg_caps_to_codecid (caps, NULL);
/* close old session */
gst_ffmpegdec_close (ffmpegdec);
@ -2538,9 +2530,6 @@ 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;