[vlc-commits] avcommon: add a conversion from AVRational to vlc_rational_t
Steve Lhomme
git at videolan.org
Fri Apr 7 14:27:15 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Apr 6 12:40:40 2017 +0200| [b637d46b8254e526163f534c837a1fca20abc77d] | committer: Jean-Baptiste Kempf
avcommon: add a conversion from AVRational to vlc_rational_t
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b637d46b8254e526163f534c837a1fca20abc77d
---
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 f55ad95..a0ae844 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
More information about the vlc-commits
mailing list