mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
avvidenc: Set width/height and format in the AVFrame we pass to the encoder API
This commit is contained in:
parent
e7d061a2d0
commit
55fd9e3623
1 changed files with 4 additions and 0 deletions
|
@ -643,6 +643,10 @@ gst_ffmpegvidenc_handle_frame (GstVideoEncoder * encoder,
|
|||
}
|
||||
}
|
||||
|
||||
ffmpegenc->picture->format = ffmpegenc->context->pix_fmt;
|
||||
ffmpegenc->picture->width = GST_VIDEO_FRAME_WIDTH (&buffer_info->vframe);
|
||||
ffmpegenc->picture->height = GST_VIDEO_FRAME_HEIGHT (&buffer_info->vframe);
|
||||
|
||||
ffmpegenc->picture->pts =
|
||||
gst_ffmpeg_time_gst_to_ff (frame->pts /
|
||||
ffmpegenc->context->ticks_per_frame, ffmpegenc->context->time_base);
|
||||
|
|
Loading…
Reference in a new issue