[vlc-commits] videotoolbox: slightly improved error handling

Felix Paul Kühne git at videolan.org
Mon Oct 12 16:28:21 CEST 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Oct 12 16:27:23 2015 +0200| [a2f5b3e1c1b6eabb44293771c966f623034e0507] | committer: Felix Paul Kühne

videotoolbox: slightly improved error handling

Error 8973 is triggered if the number of open HW decoding sessions is > than the number of available HW decoders

Further, a failing session creation should not invalidate the entire video decoding chain but just trigger the fallback

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2f5b3e1c1b6eabb44293771c966f623034e0507
---

 modules/codec/videotoolbox.m |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 4a5352b..d662528 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -561,14 +561,14 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
             case -12210:
                 msg_Err(p_dec, "Insufficient authorization to create decoder");
                 break;
+            case -8973:
+                msg_Err(p_dec, "Could not select and open decoder instance");
+                break;
 
             default:
                 msg_Err(p_dec, "Decompression session creation failed (%i)", status);
                 break;
         }
-        /* an invalid session is an inrecoverable failure */
-        p_dec->b_error = true;
-
         return VLC_EGENERIC;
     }
 



More information about the vlc-commits mailing list