diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-01 23:54:40 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-01 23:54:40 +0000 |
commit | 02e1d2fdcea9c677f08f4539993e96799ad282cb (patch) | |
tree | 936438da8fcb443001024b418370b5f6ecb2eb94 /channels/vcodecs.c | |
parent | 2632ca870c8b881dfa14f25d4e0c4bedbbb492b3 (diff) |
prevent a panic when destroying a channel with no incoming video.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95672 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/vcodecs.c')
-rw-r--r-- | channels/vcodecs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/vcodecs.c b/channels/vcodecs.c index 6eccd63f1..ae3770920 100644 --- a/channels/vcodecs.c +++ b/channels/vcodecs.c @@ -1,7 +1,7 @@ /* * Asterisk -- An open source telephony toolkit. * - * Copyright 2007, Sergio Fadda, Luigi Rizzo + * Copyright 2007-2008, Sergio Fadda, Luigi Rizzo * * See http://www.asterisk.org for more information about * the Asterisk project. Please do not directly contact @@ -1168,6 +1168,8 @@ static struct video_dec_desc *dec_uninit(struct video_dec_desc *v) { int i; + if (v == NULL) /* not initialized yet */ + return NULL; if (v->parser) { av_parser_close(v->parser); v->parser = NULL; |