--- a/cinelerra/fileffmpeg.C	2026-09-23 11:08:09.689883274 -0600
+++ b/cinelerra/fileffmpeg.C	2026-09-24 19:03:07.794924847 -0600
@@ -182,7 +182,10 @@
 	const char *vcodec = vid_config->asset->vcodec;
 	const AVCodec *av_codec = !FFMPEG::get_codec(video_codec, "video", vcodec) ?
 		avcodec_find_encoder_by_name(video_codec) : 0;
-	const AVPixelFormat *pix_fmts = av_codec ? av_codec->pix_fmts : 0;
+/*	const AVPixelFormat *pix_fmts = av_codec ? av_codec->pix_fmts : 0; */
+        const enum AVPixelFormat *av_codec_pix_fmts = NULL;
+        avcodec_get_supported_config(NULL, av_codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&av_codec_pix_fmts, NULL);
+	const AVPixelFormat *pix_fmts = av_codec ? av_codec_pix_fmts : 0;
 	if( pix_fmts ) {
 		for( int i=0; pix_fmts[i]>=0; ++i ) {
 			const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmts[i]);
@@ -213,7 +216,10 @@
 	const char *acodec = aud_config->asset->acodec;
 	const AVCodec *av_codec = !FFMPEG::get_codec(audio_codec, "audio", acodec) ?
 		avcodec_find_encoder_by_name(audio_codec) : 0;
-	const AVSampleFormat *sample_fmts = av_codec ? av_codec->sample_fmts : 0;
+/*	const AVSampleFormat *sample_fmts = av_codec ? av_codec->sample_fmts : 0; */
+	const enum AVSampleFormat *av_codec_sample_fmts = NULL;
+        avcodec_get_supported_config(NULL, av_codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&av_codec_sample_fmts, NULL);
+	const AVSampleFormat *sample_fmts = av_codec ? av_codec_sample_fmts : 0;
 	if( sample_fmts ) {
 		for( int i=0; sample_fmts[i]>=0; ++i ) {
 			const char *name = av_get_sample_fmt_name(sample_fmts[i]);
