summaryrefslogtreecommitdiffstats
path: root/libavformat/protocols.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <[email protected]>2020-09-06 12:34:58 +0200
committerAndreas Rheinhardt <[email protected]>2020-09-10 13:43:43 +0200
commit06f99cc4ddbb16f8fd9ae3d72835d542be3dbab2 (patch)
tree11a03c037d1943e2d9bdec8a3229f53aceed5c13 /libavformat/protocols.c
parent4b836c86132feb67ca10e383988884dd67bcd19a (diff)
avformat/segment: Fix segfault on allocation error, avoid allocation
If the user has set none of the options specifying the segments' durations, a default value of 2s is used by duplicating a "2" string and using av_parse_time() on it. Yet duplicating the string was unchecked and if the allocation failed, one would get a segfault in av_parse_time(). This commit solves this by turning said option into an option of type AV_OPT_TYPE_DURATION (which also uses av_parse_time() internally), avoiding duplicating the string altogether. Reviewed-by: Ridley Combs <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
Diffstat (limited to 'libavformat/protocols.c')
0 files changed, 0 insertions, 0 deletions