Commit 21b459e4 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/segment: Fix header_filename handling

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 23261e60
...@@ -701,7 +701,9 @@ static int seg_write_header(AVFormatContext *s) ...@@ -701,7 +701,9 @@ static int seg_write_header(AVFormatContext *s)
goto fail; goto fail;
if (seg->write_header_trailer) { if (seg->write_header_trailer) {
if ((ret = s->io_open(s, &oc->pb, oc->filename, AVIO_FLAG_WRITE, NULL)) < 0) { if ((ret = s->io_open(s, &oc->pb,
seg->header_filename ? seg->header_filename : oc->filename,
AVIO_FLAG_WRITE, NULL)) < 0) {
av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", oc->filename); av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", oc->filename);
goto fail; goto fail;
} }
......
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