[FFmpeg-cvslog] mediacodec: Return ENOSYS on unsupported platforms

Timothy Gu git at videolan.org
Wed Aug 3 08:32:49 EEST 2016


ffmpeg | branch: master | Timothy Gu <timothygu99 at gmail.com> | Tue Aug  2 20:48:16 2016 -0700| [fd242479c6667dbd5e6e869c6bbade4f3d368f29] | committer: Timothy Gu

mediacodec: Return ENOSYS on unsupported platforms

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd242479c6667dbd5e6e869c6bbade4f3d368f29
---

 libavcodec/mediacodec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mediacodec.c b/libavcodec/mediacodec.c
index cd8766f..a658f0e 100644
--- a/libavcodec/mediacodec.c
+++ b/libavcodec/mediacodec.c
@@ -22,6 +22,8 @@
 
 #include "config.h"
 
+#include "libavutil/error.h"
+
 #if CONFIG_H264_MEDIACODEC_HWACCEL
 
 #include <jni.h>
@@ -108,7 +110,7 @@ AVMediaCodecContext *av_mediacodec_alloc_context(void)
 
 int av_mediacodec_default_init(AVCodecContext *avctx, AVMediaCodecContext *ctx, void *surface)
 {
-    return 0;
+    return AVERROR(ENOSYS);
 }
 
 void av_mediacodec_default_free(AVCodecContext *avctx)
@@ -117,7 +119,7 @@ void av_mediacodec_default_free(AVCodecContext *avctx)
 
 int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render)
 {
-    return 0;
+    return AVERROR(ENOSYS);
 }
 
 #endif



More information about the ffmpeg-cvslog mailing list