diff options
author | Timothy Gu <timothygu99@gmail.com> | 2016-08-02 20:48:16 -0700 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2016-08-02 22:32:12 -0700 |
commit | fd242479c6667dbd5e6e869c6bbade4f3d368f29 (patch) | |
tree | e454b7eba07f4a32445dae4dbfc0528fcc730eeb | |
parent | 4e2a8c49202dfe7de41191bda86c218cb89a7a22 (diff) | |
download | ffmpeg-fd242479c6667dbd5e6e869c6bbade4f3d368f29.tar.gz |
mediacodec: Return ENOSYS on unsupported platforms
-rw-r--r-- | libavcodec/mediacodec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mediacodec.c b/libavcodec/mediacodec.c index cd8766f3b1..a658f0eaf0 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 |