Commit 2e00311f authored by Jan Schmidt's avatar Jan Schmidt

flvdemux: Use gst_video_guess_framerate()

Use gst_video_guess_framerate() from libgstvideo to guess
sensible common framerates where possible from the
floating point fps in the stream.
parent f4b51077
plugin_LTLIBRARIES = libgstflv.la
libgstflv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@\
libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ \
-lgstvideo-@GST_API_VERSION@ \
$(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
libgstflv_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS}
libgstflv_la_SOURCES = gstflvdemux.c gstflvmux.c
......
......@@ -43,6 +43,7 @@
#include <gst/pbutils/descriptions.h>
#include <gst/pbutils/pbutils.h>
#include <gst/audio/audio.h>
#include <gst/video/video.h>
/* FIXME: don't rely on own GstIndex */
#include "gstindex.c"
......@@ -1255,7 +1256,7 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag)
if (G_LIKELY (demux->framerate)) {
gint num = 0, den = 0;
gst_util_double_to_fraction (demux->framerate, &num, &den);
gst_video_guess_framerate (GST_SECOND / demux->framerate, &num, &den);
GST_DEBUG_OBJECT (demux->video_pad,
"fps to be used on caps %f (as a fraction = %d/%d)", demux->framerate,
num, den);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment