mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
libav: set the frame rate values in ffmpeg stream context
To avoid a default value to be used in mux.c+304, give the frame rate detected from the caps. Fix IVF header. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4248>
This commit is contained in:
parent
6f21ef9d3a
commit
f0d61ac8b0
1 changed files with 3 additions and 0 deletions
|
@ -486,6 +486,9 @@ gst_ffmpegmux_setcaps (GstPad * pad, GstObject * parent, GstCaps * caps)
|
||||||
/* copy over the aspect ratios, ffmpeg expects the stream aspect to match the
|
/* copy over the aspect ratios, ffmpeg expects the stream aspect to match the
|
||||||
* codec aspect. */
|
* codec aspect. */
|
||||||
st->sample_aspect_ratio = st->codecpar->sample_aspect_ratio;
|
st->sample_aspect_ratio = st->codecpar->sample_aspect_ratio;
|
||||||
|
/* copy over the frame rate to be used in the container format. */
|
||||||
|
st->time_base.num = tmp.time_base.num;
|
||||||
|
st->time_base.den = tmp.time_base.den;
|
||||||
|
|
||||||
GST_LOG_OBJECT (pad, "accepted caps %" GST_PTR_FORMAT, caps);
|
GST_LOG_OBJECT (pad, "accepted caps %" GST_PTR_FORMAT, caps);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue