diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-02-16 09:11:08 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-02-16 09:13:23 +0200 |
commit | 55fd9e362360dc717a34ace8caa7b2e880bc4cc1 (patch) | |
tree | a8a175b44a327062297d363b903bc13e1729a68c | |
parent | e7d061a2d0499dc18e3248fbb35d22092bc10d57 (diff) | |
download | gst-libav-55fd9e362360dc717a34ace8caa7b2e880bc4cc1.tar.gz |
avvidenc: Set width/height and format in the AVFrame we pass to the encoder API
-rw-r--r-- | ext/libav/gstavvidenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c index d314e16..264ea36 100644 --- a/ext/libav/gstavvidenc.c +++ b/ext/libav/gstavvidenc.c @@ -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); |