[vlc-commits] decoder: fail earlier if the category is unknown
Thomas Guillem
git at videolan.org
Thu Feb 9 15:57:27 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Feb 4 16:22:17 2017 +0100| [728d998503e582ff0c891953ebd8dc8c3dade344] | committer: Thomas Guillem
decoder: fail earlier if the category is unknown
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=728d998503e582ff0c891953ebd8dc8c3dade344
---
src/input/decoder.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index a9a3bcd..bed21b3 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1450,10 +1450,7 @@ static void DecoderProcess( decoder_t *p_dec, block_t *p_block )
case VIDEO_ES: DecoderProcessVideo( p_dec, p_block ); return;
case AUDIO_ES: DecoderProcessAudio( p_dec, p_block ); return;
case SPU_ES: DecoderProcessSpu( p_dec, p_block ); return;
-
- default:
- msg_Err( p_dec, "unknown ES format" );
- p_dec->b_error = true;
+ default: vlc_assert_unreachable();
}
error:
@@ -1740,6 +1737,10 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
case SPU_ES:
p_dec->pf_queue_sub = DecoderQueueSpu;
break;
+ default:
+ msg_Err( p_dec, "unknown ES format" );
+ UnloadDecoder( p_dec );
+ return p_dec;
}
/* Copy ourself the input replay gain */
if( fmt->i_cat == AUDIO_ES )
More information about the vlc-commits
mailing list