Skip to content

Commit d282f6b

Browse files
TRy setting sw_pix_fmt
1 parent 7e3e9f3 commit d282f6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/zm_videostore.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ bool VideoStore::open() {
226226
video_out_ctx->max_b_frames = video_in_ctx->max_b_frames;
227227
video_out_ctx->qmin = video_in_ctx->qmin;
228228
video_out_ctx->qmax = video_in_ctx->qmax;
229+
video_out_ctx->sw_pix_fmt = chosen_codec_data->sw_pix_fmt;
230+
//video_out_ctx->pix_fmt = chosen_codec_data->hw_pix_fmt, av_get_pix_fmt_name(chosen_codec_data->hw_pix_fmt),
229231

230232
if (!av_dict_get(opts, "crf", nullptr, AV_DICT_MATCH_CASE)) {
231233
if (av_dict_set(&opts, "crf", "23", 0)<0)
@@ -332,7 +334,7 @@ bool VideoStore::open() {
332334
* the motion of the chroma plane does not match the luma plane. */
333335
video_out_ctx->mb_decision = 2;
334336
}
335-
if (setup_hwaccel(video_out_ctx,
337+
if (setup_hwaccel(video_out_ctx,
336338
chosen_codec_data, hw_device_ctx, monitor->EncoderHWAccelDevice(), monitor->Width(), monitor->Height())) {
337339
continue;
338340
}

0 commit comments

Comments
 (0)