[x264-devel] Catch incorrect usage of libx264 API for delayed frames flushing
Anton Mitrofanov
git at videolan.org
Sun Jul 26 22:26:28 CEST 2015
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Tue Apr 21 23:08:19 2015 +0300| [0b0210857ef13214f12861dec672006455a556d6] | committer: Henrik Gramner
Catch incorrect usage of libx264 API for delayed frames flushing
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=0b0210857ef13214f12861dec672006455a556d6
---
encoder/encoder.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/encoder/encoder.c b/encoder/encoder.c
index edc387c..9323b38 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -3238,6 +3238,12 @@ int x264_encoder_encode( x264_t *h,
/* ------------------- Setup new frame from picture -------------------- */
if( pic_in != NULL )
{
+ if( h->lookahead->b_exit_thread )
+ {
+ x264_log( h, X264_LOG_ERROR, "lookahead thread is already stopped\n" );
+ return -1;
+ }
+
/* 1: Copy the picture to a frame and move it to a buffer */
x264_frame_t *fenc = x264_frame_pop_unused( h, 0 );
if( !fenc )
More information about the x264-devel
mailing list