[FFmpeg-devel] [PATCH 1/8] libavdevice/decklink: Add support for EIA-708 output over SDI

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Dec 29 22:41:30 EET 2017

2017-12-29 19:12 GMT+01:00 Devin Heitmueller <dheitmueller at ltnglobal.com>:

> +    side_data = av_frame_get_side_data(pic, AV_FRAME_DATA_A53_CC);
> +    if (side_data && side_data->size) {
> +        uint8_t *buf = av_packet_new_side_data(pkt, AV_PKT_DATA_A53_CC, side_data->size);
> +        if (buf)
> +            memcpy(buf, side_data->data, side_data->size);
> +        else
> +            return AVERROR(ENOMEM);

Maybe you disagree but the following is slightly simpler imo:

  if (!buf)
    return AVERROR();
  memcpy(buf, data, size);



I tried to voice this before and I assume there is no solution
but this is a large optional code block depending on an
external library inside an optional feature depending on
another - not super-common - external library: This will not
get much testing, not even for compilation.

Carl Eugen

More information about the ffmpeg-devel mailing list