[vlc-devel] [PATCH 1/2] image converter: prepare for using multithreaded encoder

Rafaël Carré funman at videolan.org
Tue May 28 11:30:55 CEST 2013


---
 src/misc/image.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/misc/image.c b/src/misc/image.c
index 2ce3f9c..6d2a6a0 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -345,6 +345,8 @@ static block_t *ImageWrite( image_handler_t *p_image, picture_t *p_pic,
         {
             p_block = p_image->p_enc->pf_encode_video( p_image->p_enc,
                                                        p_tmp_pic );
+            if (!p_block)
+                p_block = p_image->p_enc->pf_encode_video( p_image->p_enc, NULL );
             p_image->p_filter->pf_video_buffer_del( p_image->p_filter,
                                                     p_tmp_pic );
         }
@@ -354,6 +356,8 @@ static block_t *ImageWrite( image_handler_t *p_image, picture_t *p_pic,
     else
     {
         p_block = p_image->p_enc->pf_encode_video( p_image->p_enc, p_pic );
+        if (!p_block)
+            p_block = p_image->p_enc->pf_encode_video( p_image->p_enc, NULL );
     }
 
     if( !p_block )
-- 
1.8.1.2



More information about the vlc-devel mailing list