aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/channel.c b/channel.c
index 738c6581b..26e5e05ba 100644
--- a/channel.c
+++ b/channel.c
@@ -1307,10 +1307,16 @@ int ast_hangup(struct ast_channel *chan)
return 0;
}
free_translation(chan);
- if (chan->stream) /* Close audio stream */
+ /* Close audio stream */
+ if (chan->stream) {
ast_closestream(chan->stream);
- if (chan->vstream) /* Close video stream */
+ chan->stream = NULL;
+ }
+ /* Close video stream */
+ if (chan->vstream) {
ast_closestream(chan->vstream);
+ chan->vstream = NULL;
+ }
if (chan->sched) {
sched_context_destroy(chan->sched);
chan->sched = NULL;