[FFmpeg-devel] [PATCH v2 2/2] fftools/ffmpeg: Add stream metadata from first frame's metadata

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue May 7 01:04:07 EEST 2019


Am Mo., 6. Mai 2019 um 05:41 Uhr schrieb Jun Li <junli1026 at gmail.com>:
> +    uint8_t* sd = NULL;

Wouldn't it simplify the patch if this were a pointer to int32_t?
Or is there a aliasing violation that can't be avoided?

> +    if (entry) {
> +        orientation = atoi(entry->value);
> +        sd = av_stream_new_side_data(ist->st, AV_PKT_DATA_DISPLAYMATRIX,
> +                                                sizeof(int32_t) * 9);

Most of the time, sizeof(type) makes little sense, if you cannot use
sizeof(variable),
just put "4" there.

Carl Eugen


More information about the ffmpeg-devel mailing list