From 9c8644d5f3f05b52a81c259c32217bcd57792ae5 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Thu, 20 Jun 2019 20:12:00 -0600 Subject: [PATCH 1/1] fix prores pix_fmt with hw_dev probe --- cinelerra-5.1/cinelerra/ffmpeg.C | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 3bb9dd80..9569de77 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -2487,7 +2487,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) vid->height = asset->height; vid->frame_rate = asset->frame_rate; - AVPixelFormat pix_fmt = AV_PIX_FMT_NONE; + AVPixelFormat pix_fmt = av_get_pix_fmt(asset->ff_pixel_format); if( opt_hw_dev != 0 ) { AVHWDeviceType hw_type = vid->encode_hw_activate(opt_hw_dev); switch( hw_type ) { @@ -2495,9 +2495,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) pix_fmt = AV_PIX_FMT_VAAPI; break; case AV_HWDEVICE_TYPE_NONE: - default: - pix_fmt = av_get_pix_fmt(asset->ff_pixel_format); - break; + default: break; } } if( pix_fmt == AV_PIX_FMT_NONE ) -- 2.26.2