avviddec: Remove vc1/wmv3 override

FFMPEG 5+ doesn't allow overriding the codec anymore (causes a segfault if you
attempt to do that). But the best part is ... that with the current caps
implementation in pad template and gst_ffmpeg_caps_to_codecid() we would never
replace it by anything different than the existing codec id.

Fixes #1054

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2052>
This commit is contained in:
Edward Hervey 2022-03-29 09:36:06 +02:00 committed by GStreamer Marge Bot
parent f5ab89abf9
commit be1b31b5f8

View file

@ -477,10 +477,6 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
GST_DEBUG_OBJECT (ffmpegdec, "setcaps called");
GST_OBJECT_LOCK (ffmpegdec);
/* stupid check for VC1 */
if ((oclass->in_plugin->id == AV_CODEC_ID_WMV3) ||
(oclass->in_plugin->id == AV_CODEC_ID_VC1))
oclass->in_plugin->id = gst_ffmpeg_caps_to_codecid (state->caps, NULL);
/* close old session */
if (ffmpegdec->opened) {
@ -2553,8 +2549,7 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
/* (Ronald) MPEG-4 gets a higher priority because it has been well-
* tested and by far outperforms divxdec/xviddec - so we prefer it.
* msmpeg4v3 same, as it outperforms divxdec for divx3 playback.
* VC1/WMV3 are not working and thus unpreferred for now. */
* msmpeg4v3 same, as it outperforms divxdec for divx3 playback. */
switch (in_plugin->id) {
case AV_CODEC_ID_MPEG1VIDEO:
case AV_CODEC_ID_MPEG2VIDEO: