• Andreas Rheinhardt's avatar
    avformat/hlsenc: Avoid duplicating strings when parsing · 4fbcb697
    Andreas Rheinhardt authored
    Up until now, the HLS muxer uses av_strtok() to split an input string
    controlling parameters of the VariantStreams and then duplicates
    parts of this string containing parameters such as the language or the
    name of the VariantStream. But these parts are proper zero-terminated
    strings of their own that are never modified lateron, so one can simply
    use the substring as-is without creating a copy. This commit implements
    this.
    
    The same also happened for the string controlling the closed caption
    groups.
    
    Furthermore, add const to indicate that the pointers to these substrings
    are not used to modify them and also to indicate that these strings are
    not allocated on their own.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    4fbcb697
hlsenc.c 110 KB