summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-plugins/gst-plugins-ffmpeg/files/0.10.13_p201211-iscodec.patch')
-rw-r--r--media-plugins/gst-plugins-ffmpeg/files/0.10.13_p201211-iscodec.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/media-plugins/gst-plugins-ffmpeg/files/0.10.13_p201211-iscodec.patch b/media-plugins/gst-plugins-ffmpeg/files/0.10.13_p201211-iscodec.patch
new file mode 100644
index 000000000000..ef198cc33b55
--- /dev/null
+++ b/media-plugins/gst-plugins-ffmpeg/files/0.10.13_p201211-iscodec.patch
@@ -0,0 +1,24 @@
+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__ */