Selaa lähdekoodia

linux-v4l2: Fix deprecation with FFmpeg 7

FFmpeg 7 header states that avcodec_close should not be used since
avcodev_free_context already close the context.
tytan652 1 vuosi sitten
vanhempi
sitoutus
7d4501131a
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      plugins/linux-v4l2/v4l2-decoder.c

+ 2 - 0
plugins/linux-v4l2/v4l2-decoder.c

@@ -78,7 +78,9 @@ void v4l2_destroy_decoder(struct v4l2_decoder *decoder)
 	}
 
 	if (decoder->context) {
+#if LIBAVCODEC_VERSION_MAJOR < 61
 		avcodec_close(decoder->context);
+#endif
 		avcodec_free_context(&decoder->context);
 	}
 }