Skip to content

Commit a9b988f

Browse files
committed
lavc_common: fixed compat
+ fixed unused parm warn with old FFmpeg
1 parent 225fbc8 commit a9b988f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libavcodec/lavc_common.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ avc_get_supported_pix_fmts(const AVCodecContext *ctx, const AVCodec *codec)
380380
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(61, 13, 100)
381381
return avc_get_supported_config(ctx, codec, AV_CODEC_CONFIG_PIX_FORMAT);
382382
#else
383+
(void) ctx;
383384
return codec->pix_fmts;
384385
#endif
385386
}
@@ -390,7 +391,8 @@ avc_get_supported_sample_fmts(const AVCodecContext *ctx, const AVCodec *codec)
390391
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(61, 13, 100)
391392
return avc_get_supported_config(ctx, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT);
392393
#else
393-
return codec->pix_fmts;
394+
(void) ctx;
395+
return codec->sample_fmts;
394396
#endif
395397
}
396398
///< @copydoc avc_get_supported_config
@@ -399,6 +401,7 @@ const int *avc_get_supported_sample_rates(const AVCodecContext *ctx, const AVCod
399401
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(61, 13, 100)
400402
return avc_get_supported_config(ctx, codec, AV_CODEC_CONFIG_SAMPLE_RATE);
401403
#else
404+
(void) ctx;
402405
return codec->supported_samplerates;
403406
#endif
404407
}

0 commit comments

Comments
 (0)