diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-08 04:30:10 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-08 04:30:10 +0000 |
commit | 85d2c9f8c94a9820fa42a53fde922c5b4550b1c4 (patch) | |
tree | b05576fee2e8c1c3d251a3558574b3bf5ca832b2 | |
parent | 1af231176b52bd8d60e2acf6619c10a356454bbc (diff) |
Minor video fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7866 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | file.c | 6 | ||||
-rw-r--r-- | formats/format_h264.c | 2 |
2 files changed, 5 insertions, 3 deletions
@@ -184,8 +184,6 @@ int ast_format_unregister(const char *name) int ast_stopstream(struct ast_channel *tmp) { /* Stop a running stream if there is one */ - if (tmp->vstream) - ast_closestream(tmp->vstream); if (tmp->stream) { ast_closestream(tmp->stream); if (tmp->oldwriteformat && ast_set_write_format(tmp, tmp->oldwriteformat)) @@ -730,6 +728,10 @@ int ast_closestream(struct ast_filestream *f) f->realfilename = NULL; } f->fmt->close(f); + if (f->vfs) { + ast_closestream(f->vfs); + f->vfs = NULL; + } return 0; } diff --git a/formats/format_h264.c b/formats/format_h264.c index e132e0fe0..662320fb6 100644 --- a/formats/format_h264.c +++ b/formats/format_h264.c @@ -164,7 +164,7 @@ static struct ast_frame *h264_read(struct ast_filestream *s, int *whennext) } if ((res = fread(s->h264, 1, len, s->f)) != len) { if (res) - ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno)); + ast_log(LOG_WARNING, "Short read (%d of %d) (%s)!\n", res, len, strerror(errno)); return NULL; } s->fr.samples = s->lastts; |