[vlc-commits] decoder: do not try to fetch attachments if there is no input
Rémi Denis-Courmont
git at videolan.org
Mon Apr 4 19:41:41 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 4 15:17:23 2011 +0300| [397701cc8b709f15ed94ffaab2ee3bc57e729f4f] | committer: Rémi Denis-Courmont
decoder: do not try to fetch attachments if there is no input
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=397701cc8b709f15ed94ffaab2ee3bc57e729f4f
---
src/input/decoder.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 587ff51..bbbbcf1 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -659,7 +659,11 @@ static int DecoderGetInputAttachments( decoder_t *p_dec,
input_attachment_t ***ppp_attachment,
int *pi_attachment )
{
- return input_Control( p_dec->p_owner->p_input, INPUT_GET_ATTACHMENTS,
+ input_thread_t *p_input = p_dec->p_owner->p_input;
+
+ if( unlikely(p_input == NULL) )
+ return VLC_ENOOBJ;
+ return input_Control( p_input, INPUT_GET_ATTACHMENTS,
ppp_attachment, pi_attachment );
}
static mtime_t DecoderGetDisplayDate( decoder_t *p_dec, mtime_t i_ts )
More information about the vlc-commits
mailing list