diff --git a/src/libavcodec/to_lavc_vid_conv.c b/src/libavcodec/to_lavc_vid_conv.c index 829e93d5b..6922db377 100644 --- a/src/libavcodec/to_lavc_vid_conv.c +++ b/src/libavcodec/to_lavc_vid_conv.c @@ -1611,9 +1611,9 @@ struct to_lavc_vid_conv *to_lavc_vid_conv_init(codec_t in_pixfmt, int width, int return NULL; } s->out_frame->pts = -1; - s->out_frame->format = out_pixfmt; - s->out_frame->width = width; - s->out_frame->height = height; + s->tmp_frame->format = s->out_frame->format = out_pixfmt; + s->tmp_frame->width = s->out_frame->width = width; + s->tmp_frame->height = s->out_frame->height = height; get_av_pixfmt_details(out_pixfmt, &s->out_frame->colorspace, &s->out_frame->color_range); av_frame_copy_props(s->tmp_frame, s->out_frame);