mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/webmdashenc: Require the 'adaptation_sets' option to be set
This seems to be non-optional, and if the muxer is run without it,
strlen() is run on NULL, causing a segfault.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cbd3a68f3e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
70e26e9c25
commit
351dc1f33a
@ -428,6 +428,10 @@ static int parse_adaptation_sets(AVFormatContext *s)
|
|||||||
char *p = w->adaptation_sets;
|
char *p = w->adaptation_sets;
|
||||||
char *q;
|
char *q;
|
||||||
enum { new_set, parsed_id, parsing_streams } state;
|
enum { new_set, parsed_id, parsing_streams } state;
|
||||||
|
if (!w->adaptation_sets) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "The 'adaptation_sets' option must be set.\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
// syntax id=0,streams=0,1,2 id=1,streams=3,4 and so on
|
// syntax id=0,streams=0,1,2 id=1,streams=3,4 and so on
|
||||||
state = new_set;
|
state = new_set;
|
||||||
while (p < w->adaptation_sets + strlen(w->adaptation_sets)) {
|
while (p < w->adaptation_sets + strlen(w->adaptation_sets)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user