diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-08-08 13:49:23 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-08-10 23:56:35 +0200 |
commit | a315474a023c6de784f58b2e5d208dd468f60270 (patch) | |
tree | 25496a31f56142a882e96eb253d298b4d71404b1 /libavformat | |
parent | a08ff2805982bcf5128c396314f6424c5e1a250a (diff) | |
download | ffmpeg-a315474a023c6de784f58b2e5d208dd468f60270.tar.gz |
avformat/matroskaenc: Add const where appropriate
Also move getting the DOVI side data immediately before its use.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskaenc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 12a28a6b5c..abac70dd80 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1667,12 +1667,11 @@ static int mkv_write_stereo_mode(AVFormatContext *s, EbmlWriter *writer, return 0; } -static void mkv_write_blockadditionmapping(AVFormatContext *s, MatroskaMuxContext *mkv, - AVIOContext *pb, mkv_track *track, AVStream *st) +static void mkv_write_blockadditionmapping(AVFormatContext *s, const MatroskaMuxContext *mkv, + AVIOContext *pb, mkv_track *track, const AVStream *st) { #if CONFIG_MATROSKA_MUXER - AVDOVIDecoderConfigurationRecord *dovi = (AVDOVIDecoderConfigurationRecord *) - av_stream_get_side_data(st, AV_PKT_DATA_DOVI_CONF, NULL); + const AVDOVIDecoderConfigurationRecord *dovi; if (IS_SEEKABLE(s->pb, mkv)) { track->blockadditionmapping_offset = avio_tell(pb); @@ -1686,6 +1685,8 @@ static void mkv_write_blockadditionmapping(AVFormatContext *s, MatroskaMuxContex + 4 /* BlockAddIDType */); } + dovi = (const AVDOVIDecoderConfigurationRecord *) + av_stream_get_side_data(st, AV_PKT_DATA_DOVI_CONF, NULL); if (dovi && dovi->dv_profile <= 10) { ebml_master mapping; uint8_t buf[ISOM_DVCC_DVVC_SIZE]; |