Commit eb2f3910 authored by Martin Storsjö's avatar Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent d3a72bec
...@@ -108,7 +108,8 @@ static int64_t ism_seek(void *opaque, int64_t offset, int whence) ...@@ -108,7 +108,8 @@ static int64_t ism_seek(void *opaque, int64_t offset, int whence)
os->tail_out = NULL; os->tail_out = NULL;
} }
if (offset >= os->cur_start_pos) { 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; os->cur_pos = offset;
return offset; return offset;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment