You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-plugins/gst-plugins-ffmpeg/files/0.10.13_p201211-iscodec.patch

25 lines
857 B

Provide replacement for these functions when not available.
(e.g ffmpeg-0.10)
Index: gst-ffmpeg-0.10.13_p201211/ext/ffmpeg/gstffmpegutils.h
===================================================================
--- gst-ffmpeg-0.10.13_p201211.orig/ext/ffmpeg/gstffmpegutils.h
+++ gst-ffmpeg-0.10.13_p201211/ext/ffmpeg/gstffmpegutils.h
@@ -99,4 +99,16 @@ av_smp_format_depth(enum AVSampleFormat
GstBuffer *
new_aligned_buffer (gint size, GstCaps * caps);
+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,7,0) || (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,8,0)))
+static inline int av_codec_is_encoder(AVCodec *codec)
+{
+ return codec && (codec->encode || codec->encode2);
+}
+
+static inline int av_codec_is_decoder(AVCodec *codec)
+{
+ return codec && codec->decode;
+}
+#endif
+
#endif /* __GST_FFMPEG_UTILS_H__ */