summaryrefslogtreecommitdiff
path: root/libavformat/segment.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-10 17:59:58 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-10 17:59:58 +0100
commit21b459e4bbfc14fd1ec9076e3a0b01f6f11ba960 (patch)
treef4a67bfdfeee3b8bd689f9bdab87df7cffa609cc /libavformat/segment.c
parent23261e60014908da7446e9b5bc7401dc30fdecd6 (diff)
avformat/segment: Fix header_filename handling
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r--libavformat/segment.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index f6df1759c3..dd3b092139 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -701,7 +701,9 @@ static int seg_write_header(AVFormatContext *s)
goto fail;
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);
goto fail;
}