diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 15:42:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 15:57:43 +0200 |
commit | fd601ba6b1c6a646aeb19839759644126316371e (patch) | |
tree | 356219cfb107d2dc9dc117d76192d25d4bf0de0c /libavformat/segment.c | |
parent | 6a0b5e34763c14a1e35e767f374ffb98fa64732f (diff) | |
parent | 5c08ae4f37281441188447cd04dcaf7cd7ce031f (diff) | |
download | ffmpeg-fd601ba6b1c6a646aeb19839759644126316371e.tar.gz |
Merge commit '5c08ae4f37281441188447cd04dcaf7cd7ce031f'
* commit '5c08ae4f37281441188447cd04dcaf7cd7ce031f':
segment: Add an option to prepend a string to the list entries
Conflicts:
doc/muxers.texi
libavformat/segment.c
See: 5e278c19c752d65fdc1da1ceb599b091f71a4b4b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r-- | libavformat/segment.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c index 3568d2a0de..c8dcf62dc2 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -73,7 +73,7 @@ typedef struct { char *list; ///< filename for the segment list file int list_flags; ///< flags affecting list generation int list_size; ///< number of entries for the segment list file - char *list_entry_prefix; ///< prefix to add to list entry filenames + char *entry_prefix; ///< prefix to add to list entry filenames ListType list_type; ///< set the list type AVIOContext *list_pb; ///< list file put-byte context char *time_str; ///< segment duration specification string @@ -172,14 +172,14 @@ static int set_segment_filename(AVFormatContext *s) /* copy modified name in list entry */ size = strlen(av_basename(oc->filename)) + 1; - if (seg->list_entry_prefix) - size += strlen(seg->list_entry_prefix); + if (seg->entry_prefix) + size += strlen(seg->entry_prefix); seg->cur_entry.filename = av_mallocz(size); if (!seg->cur_entry.filename) return AVERROR(ENOMEM); snprintf(seg->cur_entry.filename, size, "%s%s", - seg->list_entry_prefix ? seg->list_entry_prefix : "", + seg->entry_prefix ? seg->entry_prefix : "", av_basename(oc->filename)); return 0; @@ -783,7 +783,6 @@ static const AVOption options[] = { { "live", "enable live-friendly list generation (useful for HLS)", 0, AV_OPT_TYPE_CONST, {.i64 = SEGMENT_LIST_FLAG_LIVE }, INT_MIN, INT_MAX, E, "list_flags"}, { "segment_list_size", "set the maximum number of playlist entries", OFFSET(list_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E }, - { "segment_list_entry_prefix", "set prefix to prepend to each list entry filename", OFFSET(list_entry_prefix), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E }, { "segment_list_type", "set the segment list type", OFFSET(list_type), AV_OPT_TYPE_INT, {.i64 = LIST_TYPE_UNDEFINED}, -1, LIST_TYPE_NB-1, E, "list_type" }, { "flat", "flat format", 0, AV_OPT_TYPE_CONST, {.i64=LIST_TYPE_FLAT }, INT_MIN, INT_MAX, E, "list_type" }, @@ -798,6 +797,7 @@ static const AVOption options[] = { { "segment_times", "set segment split time points", OFFSET(times_str),AV_OPT_TYPE_STRING,{.str = NULL}, 0, 0, E }, { "segment_frames", "set segment split frame numbers", OFFSET(frames_str),AV_OPT_TYPE_STRING,{.str = NULL}, 0, 0, E }, { "segment_wrap", "set number after which the index wraps", OFFSET(segment_idx_wrap), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E }, + { "segment_list_entry_prefix", "set base url prefix for segments", OFFSET(entry_prefix), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E }, { "segment_start_number", "set the sequence number of the first segment", OFFSET(segment_idx), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E }, { "segment_wrap_number", "set the number of wrap before the first segment", OFFSET(segment_idx_wrap_nb), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E }, |