CC: [email protected]
Bug-Id: CID 732187
---
libavformat/smoothstreamingenc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index a6d0a36..beea73d 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -128,8 +128,14 @@ static int64_t ism_seek(void *opaque, int64_t offset, int
whence)
return ret;
}
av_dict_set(&opts, "truncate", "0", 0);
- ffurl_open(&os->out2, frag->infofile, AVIO_FLAG_READ_WRITE,
&os->ctx->interrupt_callback, &opts);
+ ret = ffurl_open(&os->out2, frag->infofile, AVIO_FLAG_READ_WRITE,
+ &os->ctx->interrupt_callback, &opts);
av_dict_free(&opts);
+ if (ret < 0) {
+ os->out2 = os->tail_out;
+ os->tail_out = NULL;
+ return ret;
+ }
ffurl_seek(os->out, offset - frag->start_pos, SEEK_SET);
if (os->out2)
ffurl_seek(os->out2, offset - frag->start_pos, SEEK_SET);
--
1.9.3 (Apple Git-50)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel