[vlc-devel] [PATCH 03/28] avcommon: add a conversion from AVRational to vlc_rational_t
Steve Lhomme
robux4 at videolabs.io
Mon Apr 3 10:21:51 CEST 2017
---
modules/codec/avcodec/avcommon.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
index f55ad9532d..a0ae844a61 100644
--- a/modules/codec/avcodec/avcommon.h
+++ b/modules/codec/avcodec/avcommon.h
@@ -117,4 +117,9 @@ static inline void vlc_init_avcodec(vlc_object_t *obj)
}
#endif
+static inline vlc_rational_t FromAVRational(const AVRational rat)
+{
+ return (vlc_rational_t){.num = rat.num, .den = rat.den};
+}
+
#endif
--
2.11.1
More information about the vlc-devel
mailing list