summaryrefslogtreecommitdiff
path: root/ext/libav/gstavvidenc.h
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2020-10-06 03:47:42 +0900
committerSeungha Yang <seungha@centricular.com>2020-10-06 19:21:36 +0900
commit89bb244ab9fe57645c8da2ac7b267a0469048e4e (patch)
treeb84136be1f683fd0d5b774133ff0a37ca5ca849e /ext/libav/gstavvidenc.h
parente30cef412942f945fe13e5d819fdddcf6915fd53 (diff)
downloadgst-libav-89bb244ab9fe57645c8da2ac7b267a0469048e4e.tar.gz
avaudenc/avvidenc: Reopen encoding session if it's required
Since the commit https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/22b25b3ea5c, ffmpeg will not clear draning flag for encoder by avcodec_flush_buffers() API by default. Allowed case is only if encoder has AV_CODEC_CAP_ENCODER_FLUSH capability flag. If it's not supported, we should re-open encoding session, otherwise ffmpeg encoder will keep returning AVERROR_EOF Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/99>
Diffstat (limited to 'ext/libav/gstavvidenc.h')
-rw-r--r--ext/libav/gstavvidenc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/libav/gstavvidenc.h b/ext/libav/gstavvidenc.h
index d81d72b..2d0b7c8 100644
--- a/ext/libav/gstavvidenc.h
+++ b/ext/libav/gstavvidenc.h
@@ -41,6 +41,7 @@ struct _GstFFMpegVidEnc
AVCodecContext *context;
AVFrame *picture;
gboolean opened;
+ gboolean need_reopen;
gboolean discont;
guint pass;
gfloat quantizer;