diff options
author | Martin Storsjö <martin@martin.st> | 2012-10-06 02:24:07 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-10-06 13:05:30 +0300 |
commit | eb2f391018facf1e31e88800f3109b382da3f59c (patch) | |
tree | c10bf7ef3c94df886b0049cf3c3b752c552e1fa8 /libavformat | |
parent | d3a72becc6371563185a509b94f5daf32ddbb485 (diff) | |
download | ffmpeg-eb2f391018facf1e31e88800f3109b382da3f59c.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/smoothstreamingenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index 339a9bb08d..7ee640a931 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -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; } |