]> git.sesse.net Git - ffmpeg/commit
avformat/mxfenc: Never set codec_ul UID to NULL
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 28 Feb 2020 03:48:22 +0000 (04:48 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 16 Feb 2021 21:48:45 +0000 (22:48 +0100)
commit5400e4a50c61e53e1bc50b3e77201649bbe9c510
treed1eae392bad56ad42746e9860607278a36db8723
parenta34333f43bbfffcbd0b440ce33a8ce10d2b31c06
avformat/mxfenc: Never set codec_ul UID to NULL

mxf distinguishes codec profiles by different UIDs and therefore needs
to check that the input is actually compatible with mxf (i.e. if there
is a defined UID for it). If not, then sometimes the UID would be set to
NULL and writing the (video) packet would fail. Yet the following audio
packet would trigger writing the header (which has been postponed because
the UID is not known at the start) and if the UID is NULL, this can lead
to segfaults. This commit therefore stops setting the UID to NULL if the
input is incompatible with mxf (it has initially been set to a generic
value in mxf_write_header()).

Fixes #7993.

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/mxfenc.c