avvidenc: Set width/height and format in the AVFrame we pass to the encoder API

This commit is contained in:
Sebastian Dröge 2016-02-16 09:11:08 +02:00
parent e7d061a2d0
commit 55fd9e3623

View file

@ -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);