@@ -30,6 +30,8 @@
#include "frame_thread_encoder.h"
#include "internal.h"
+#if CONFIG_ENCODERS
+
int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
{
if (size < 0 || size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
@@ -555,3 +557,48 @@ int ff_encode_preinit(AVCodecContext *avctx)
return 0;
}
+#else // CONFIG_ENCODERS
+
+
+int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
+{
+ return AVERROR(ENOSYS);
+}
+
+int avcodec_default_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int flags)
+{
+ return AVERROR(ENOSYS);
+}
+
+int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags)
+{
+ return AVERROR(ENOSYS);
+}
+
+int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
+ const AVSubtitle *sub)
+{
+ return AVERROR(ENOSYS);
+}
+
+int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame)
+{
+ return AVERROR(ENOSYS);
+}
+
+int attribute_align_arg avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame)
+{
+ return AVERROR(ENOSYS);
+}
+
+int attribute_align_arg avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
+{
+ return AVERROR(ENOSYS);
+}
+
+int ff_encode_preinit(AVCodecContext *avctx)
+{
+ return AVERROR(ENOSYS);
+}
+
+#endif// !CONFIG_ENCODERS
This could also be moved into a separate file. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/encode.c | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+)