avcodecmap: use framerate instead of time_base when decoding

Documentation for AVCodecContext::time_base:

> decoding: the use of this field for decoding is deprecated.
> Use framerate instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/74>
This commit is contained in:
Mathieu Duponchelle 2020-05-27 16:29:27 +02:00
parent 0a985ff677
commit 797c7e1bdf

View file

@ -284,8 +284,8 @@ gst_ff_vid_caps_new (AVCodecContext * context, AVCodec * codec,
"width", G_TYPE_INT, context->width, "width", G_TYPE_INT, context->width,
"height", G_TYPE_INT, context->height, NULL); "height", G_TYPE_INT, context->height, NULL);
num = context->time_base.den / context->ticks_per_frame; num = context->framerate.num;
denom = context->time_base.num; denom = context->framerate.den;
if (!denom) { if (!denom) {
GST_LOG ("invalid framerate: %d/0, -> %d/1", num, num); GST_LOG ("invalid framerate: %d/0, -> %d/1", num, num);