summaryrefslogtreecommitdiffstats
path: root/libavcodec/mediacodec.c
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2016-08-02 20:48:16 -0700
committerTimothy Gu <timothygu99@gmail.com>2016-08-02 22:32:12 -0700
commitfd242479c6667dbd5e6e869c6bbade4f3d368f29 (patch)
treee454b7eba07f4a32445dae4dbfc0528fcc730eeb /libavcodec/mediacodec.c
parent4e2a8c49202dfe7de41191bda86c218cb89a7a22 (diff)
downloadffmpeg-streaming-fd242479c6667dbd5e6e869c6bbade4f3d368f29.zip
ffmpeg-streaming-fd242479c6667dbd5e6e869c6bbade4f3d368f29.tar.gz
mediacodec: Return ENOSYS on unsupported platforms
Diffstat (limited to 'libavcodec/mediacodec.c')
-rw-r--r--libavcodec/mediacodec.c6
1 files 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
OpenPOWER on IntegriCloud