Ticket #7188: webm-url-fix.patch

File webm-url-fix.patch, 1.0 KB (added by Marton Balint, 8 years ago)
  • libavformat/webm_chunk.c

    diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c
    index 549ec2879a..7ceb276fc4 100644
    a b static int webm_chunk_write_header(AVFormatContext *s)  
    114114    int ret;
    115115    int i;
    116116    AVDictionary *options = NULL;
     117    char oc_filename[MAX_FILENAME_SIZE];
     118    char *oc_url;
    117119
    118120    // DASH Streams can only have either one track per file.
    119121    if (s->nb_streams != 1) { return AVERROR_INVALIDDATA; }
    static int webm_chunk_write_header(AVFormatContext *s)  
    127129    if (ret < 0)
    128130        return ret;
    129131    oc = wc->avf;
    130     ret = get_chunk_filename(s, 1, oc->url);
     132    ret = get_chunk_filename(s, 1, oc_filename);
    131133    if (ret < 0)
    132134        return ret;
     135    oc_url = av_strdup(oc_filename);
     136    if (!oc_url)
     137        return AVERROR(ENOMEM);
     138    ff_format_set_url(oc, oc_url);
    133139    if (wc->http_method)
    134140        av_dict_set(&options, "method", wc->http_method, 0);
    135141    ret = s->io_open(s, &oc->pb, oc->url, AVIO_FLAG_WRITE, &options);