Skip to content

Commit

Permalink
lavc_common: fixed compat
Browse files Browse the repository at this point in the history
+ fixed unused parm warn with old FFmpeg
  • Loading branch information
MartinPulec committed Nov 13, 2024
1 parent 225fbc8 commit a9b988f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libavcodec/lavc_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ avc_get_supported_pix_fmts(const AVCodecContext *ctx, const AVCodec *codec)
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(61, 13, 100)
return avc_get_supported_config(ctx, codec, AV_CODEC_CONFIG_PIX_FORMAT);
#else
(void) ctx;
return codec->pix_fmts;
#endif
}
Expand All @@ -390,7 +391,8 @@ avc_get_supported_sample_fmts(const AVCodecContext *ctx, const AVCodec *codec)
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(61, 13, 100)
return avc_get_supported_config(ctx, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT);
#else
return codec->pix_fmts;
(void) ctx;
return codec->sample_fmts;
#endif
}
///< @copydoc avc_get_supported_config
Expand All @@ -399,6 +401,7 @@ const int *avc_get_supported_sample_rates(const AVCodecContext *ctx, const AVCod
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(61, 13, 100)
return avc_get_supported_config(ctx, codec, AV_CODEC_CONFIG_SAMPLE_RATE);
#else
(void) ctx;
return codec->supported_samplerates;
#endif
}
Expand Down

0 comments on commit a9b988f

Please sign in to comment.