#7188 closed defect (fixed)
webm_chunk muxer is broken since commit 18ac64235939c4c5c7656546a9545f68339affbe
Reported by: | octop | Owned by: | Marton Balint |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | git-master | Keywords: | webm regression |
Cc: | Marton Balint | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
The commit 18ac64235939c4c5c7656546a9545f68339affbe introduced a regression, making the webm_chunk muxer cease to function properly.
libavformat/webm_chunk.c @@ -127,12 +127,12 @@ static int webm_chunk_write_header(AVFormatContext *s) if (ret < 0) return ret; oc = wc->avf; - ret = get_chunk_filename(s, 1, oc->filename); + ret = get_chunk_filename(s, 1, oc->url); if (ret < 0) return ret; if (wc->http_method) av_dict_set(&options, "method", wc->http_method, 0); - ret = s->io_open(s, &oc->pb, oc->filename, AVIO_FLAG_WRITE, &options); + ret = s->io_open(s, &oc->pb, oc->url, AVIO_FLAG_WRITE, &options); av_dict_free(&options); if (ret < 0) return ret;
In my own testing, I discovered that oc->url
in that code evaluates to null, making the muxer return prematurely.
To reproduce:
ffmpeg -re -f lavfi -i sine -map 0 -strict -2 -c:a opus -f webm_chunk -header webm_live_sine.hdr webm_live_sine_%d.chk
Attachments (1)
Change History (7)
comment:1 by , 6 years ago
Keywords: | regression added |
---|
by , 6 years ago
Attachment: | webm-url-fix.patch added |
---|
follow-up: 3 comment:2 by , 6 years ago
Cc: | added |
---|---|
Owner: | set to |
Status: | new → open |
comment:3 by , 6 years ago
The muxer works again after applying your patch, thank you. So the issue was caused by trying to "dynamically" create the nonexistent url
field in that AVFormatContext *oc
structure?
comment:4 by , 6 years ago
Yeah, the URL field (which is a replacement for the deprecated filename field) must be dynamically allocated, so it cannot be used as a static (fixed-length) buffer. I will send this patch to ffmpeg-devel and apply and backport it in a few days.
comment:5 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fixed in 2dbe936bf7f9e0fe7e8f05e5c3b78fb1afbff164.
comment:6 by , 6 years ago
Keywords: | webm added |
---|
Could you try the attached patch?