mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
avenc: Choose 25 fps if we don't have any in the caps
Some encoders require a non-zero framerate to be configured properly and just choosing something will make them not fail completely at least. https://bugzilla.gnome.org/show_bug.cgi?id=708732
This commit is contained in:
parent
2daefd69b8
commit
9becd72b60
1 changed files with 8 additions and 2 deletions
|
@ -2511,8 +2511,14 @@ gst_ffmpeg_videoinfo_to_context (GstVideoInfo * info, AVCodecContext * context)
|
|||
context->bits_per_coded_sample = bpp;
|
||||
|
||||
context->ticks_per_frame = 1;
|
||||
if (GST_VIDEO_INFO_FPS_N (info) == 0) {
|
||||
GST_DEBUG ("Using 25/1 framerate");
|
||||
context->time_base.den = 25;
|
||||
context->time_base.num = 1;
|
||||
} else {
|
||||
context->time_base.den = GST_VIDEO_INFO_FPS_N (info);
|
||||
context->time_base.num = GST_VIDEO_INFO_FPS_D (info);
|
||||
}
|
||||
|
||||
context->sample_aspect_ratio.num = GST_VIDEO_INFO_PAR_N (info);
|
||||
context->sample_aspect_ratio.den = GST_VIDEO_INFO_PAR_D (info);
|
||||
|
|
Loading…
Reference in a new issue