avviddec: Remove vc1/wmv3 override
authorEdward Hervey <edward@centricular.com>
Tue, 29 Mar 2022 07:36:06 +0000 (09:36 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 29 Mar 2022 11:46:45 +0000 (11:46 +0000)
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>

subprojects/gst-libav/ext/libav/gstavviddec.c

index f5197fb..304dec5 100644 (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: