[FFmpeg-devel] [PATCH v3 14/25] avcodec/utils: do_encode now supports AVMEDIA_TYPE_DATA

Erkki Seppälä erkki.seppala.ext at nokia.com
Mon Sep 19 16:25:37 EEST 2016


Signed-off-by: Erkki Seppälä <erkki.seppala.ext at nokia.com>
Signed-off-by: OZOPlayer <OZOPL at nokia.com>
---
 libavcodec/utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8b55464..f0e22b9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2880,6 +2880,8 @@ static int do_encode(AVCodecContext *avctx, const AVFrame *frame, int *got_packe
     } else if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
         ret = avcodec_encode_audio2(avctx, avctx->internal->buffer_pkt,
                                     frame, got_packet);
+    } else if (avctx->codec_type == AVMEDIA_TYPE_DATA) {
+        ret = avctx->codec->encode2(avctx, avctx->internal->buffer_pkt, frame, got_packet);
     } else {
         ret = AVERROR(EINVAL);
     }
-- 
2.7.4



More information about the ffmpeg-devel mailing list