1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Martin Storsjö 2012-10-06 02:24:07 +03:00
parent d3a72becc6
commit eb2f391018

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;
}