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

Submitted by erkki.seppala.ext@nokia.com on Sept. 19, 2016, 1:25 p.m.

Details

Message ID 1474291548-17810-15-git-send-email-erkki.seppala.ext@nokia.com
State New
Headers show

Commit Message

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

Patch hide | download patch | download mbox

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);
     }