* plus another byte to stay clear of the end. */
uint8_t colour[(2 + 1 + 8) * 18 + (2 + 1) + 1];
AVIOContext buf, *dyn_cp = &buf;
- int side_data_size = 0;
int colorinfo_size;
const uint8_t *side_data;
}
side_data = av_stream_get_side_data(st, AV_PKT_DATA_CONTENT_LIGHT_LEVEL,
- &side_data_size);
- if (side_data_size) {
+ NULL);
+ if (side_data) {
const AVContentLightMetadata *metadata =
(const AVContentLightMetadata*)side_data;
put_ebml_uint(dyn_cp, MATROSKA_ID_VIDEOCOLORMAXCLL, metadata->MaxCLL);
}
side_data = av_stream_get_side_data(st, AV_PKT_DATA_MASTERING_DISPLAY_METADATA,
- &side_data_size);
- if (side_data_size == sizeof(AVMasteringDisplayMetadata)) {
+ NULL);
+ if (side_data) {
ebml_master meta_element = start_ebml_master(
dyn_cp, MATROSKA_ID_VIDEOCOLORMASTERINGMETA, 10 * (2 + 1 + 8));
const AVMasteringDisplayMetadata *metadata =
const AVStream *st)
{
ebml_master projection;
- int side_data_size = 0;
uint8_t private[20];
const AVSphericalMapping *spherical =
(const AVSphericalMapping *)av_stream_get_side_data(st, AV_PKT_DATA_SPHERICAL,
- &side_data_size);
+ NULL);
- if (!side_data_size)
+ if (!spherical)
return;
if (spherical->projection != AV_SPHERICAL_EQUIRECTANGULAR &&
const AVDictionaryEntry *tag;
MatroskaVideoStereoModeType format = MATROSKA_VIDEO_STEREOMODE_TYPE_NB;
const AVStereo3D *stereo;
- int side_data_size = 0;
*h_width = 1;
*h_height = 1;
}
stereo = (const AVStereo3D*)av_stream_get_side_data(st, AV_PKT_DATA_STEREO3D,
- &side_data_size);
- if (side_data_size >= sizeof(AVStereo3D)) {
+ NULL);
+ if (stereo) {
switch (stereo->type) {
case AV_STEREO3D_2D:
format = MATROSKA_VIDEO_STEREOMODE_TYPE_MONO;