]> granicus.if.org Git - handbrake/commitdiff
enc_qsv: fix crash.
authorRodeo <tdskywalker@gmail.com>
Mon, 26 Aug 2013 20:23:30 +0000 (20:23 +0000)
committerRodeo <tdskywalker@gmail.com>
Mon, 26 Aug 2013 20:23:30 +0000 (20:23 +0000)
This was caused by trying to encode even when encoder initialization failed (qsv_enc_init).

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5752 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/enc_qsv.c

index 0c8a221e54dc068cb1fa44c72cf1aebb09e11dcc..e38a4b510772a47c5327789e48866c3b476435d1 100644 (file)
@@ -1092,6 +1092,12 @@ int encqsvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
     }
     *buf_out = NULL;
 
+    if (*job->die)
+    {
+        // unrecoverable error in qsv_enc_init
+        return HB_WORK_DONE;
+    }
+
     if( in->size <= 0 )
     {
         // do delayed frames yet