aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/unix.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-06 12:34:58 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-10 13:43:43 +0200
commit06f99cc4ddbb16f8fd9ae3d72835d542be3dbab2 (patch)
tree11a03c037d1943e2d9bdec8a3229f53aceed5c13 /libavformat/unix.c
parent4b836c86132feb67ca10e383988884dd67bcd19a (diff)
downloadffmpeg-06f99cc4ddbb16f8fd9ae3d72835d542be3dbab2.tar.gz
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 <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/unix.c')
0 files changed, 0 insertions, 0 deletions