Browse Source

smoothstreamingenc: Check the output UrlContext before accessing it

This code can be called with a NULL UrlContext if writing of the
trailer involves seeking.

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n1.1
Martin Storsjö 12 years ago
parent
commit
eb2f391018
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/smoothstreamingenc.c

+ 2
- 1
libavformat/smoothstreamingenc.c View File

@@ -108,7 +108,8 @@ static int64_t ism_seek(void *opaque, int64_t offset, int whence)
os->tail_out = NULL;
}
if (offset >= os->cur_start_pos) {
ffurl_seek(os->out, offset - os->cur_start_pos, SEEK_SET);
if (os->out)
ffurl_seek(os->out, offset - os->cur_start_pos, SEEK_SET);
os->cur_pos = offset;
return offset;
}


Loading…
Cancel
Save