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>
This commit is contained in:
parent
a08ff28059
commit
a315474a02
@ -1667,12 +1667,11 @@ static int mkv_write_stereo_mode(AVFormatContext *s, EbmlWriter *writer,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mkv_write_blockadditionmapping(AVFormatContext *s, MatroskaMuxContext *mkv,
|
static void mkv_write_blockadditionmapping(AVFormatContext *s, const MatroskaMuxContext *mkv,
|
||||||
AVIOContext *pb, mkv_track *track, AVStream *st)
|
AVIOContext *pb, mkv_track *track, const AVStream *st)
|
||||||
{
|
{
|
||||||
#if CONFIG_MATROSKA_MUXER
|
#if CONFIG_MATROSKA_MUXER
|
||||||
AVDOVIDecoderConfigurationRecord *dovi = (AVDOVIDecoderConfigurationRecord *)
|
const AVDOVIDecoderConfigurationRecord *dovi;
|
||||||
av_stream_get_side_data(st, AV_PKT_DATA_DOVI_CONF, NULL);
|
|
||||||
|
|
||||||
if (IS_SEEKABLE(s->pb, mkv)) {
|
if (IS_SEEKABLE(s->pb, mkv)) {
|
||||||
track->blockadditionmapping_offset = avio_tell(pb);
|
track->blockadditionmapping_offset = avio_tell(pb);
|
||||||
@ -1686,6 +1685,8 @@ static void mkv_write_blockadditionmapping(AVFormatContext *s, MatroskaMuxContex
|
|||||||
+ 4 /* BlockAddIDType */);
|
+ 4 /* BlockAddIDType */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dovi = (const AVDOVIDecoderConfigurationRecord *)
|
||||||
|
av_stream_get_side_data(st, AV_PKT_DATA_DOVI_CONF, NULL);
|
||||||
if (dovi && dovi->dv_profile <= 10) {
|
if (dovi && dovi->dv_profile <= 10) {
|
||||||
ebml_master mapping;
|
ebml_master mapping;
|
||||||
uint8_t buf[ISOM_DVCC_DVVC_SIZE];
|
uint8_t buf[ISOM_DVCC_DVVC_SIZE];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user