[FFmpeg-devel] [PATCH 6/6] decklink: Add support for SCTE-104 to decklink capture
Devin Heitmueller
dheitmueller at ltnglobal.com
Fri Nov 17 02:39:36 EET 2017
> On Nov 16, 2017, at 7:35 PM, Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:
>
> On 11/16/2017 6:34 PM, Devin Heitmueller wrote:
>> ---
>> libavcodec/avcodec.h | 1 +
>> libavcodec/codec_desc.c | 6 ++++
>> libavdevice/decklink_common.h | 6 ++++
>> libavdevice/decklink_common_c.h | 1 +
>> libavdevice/decklink_dec.cpp | 64 ++++++++++++++++++++++++++++++++++++++++-
>> libavdevice/decklink_dec_c.c | 1 +
>> 6 files changed, 78 insertions(+), 1 deletion(-)
>
> Needs a version bump.
>
>> +static int setup_data(AVFormatContext *avctx)
>> +{
>> + struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
>> + struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
>> + AVStream *st;
>> + int ret = 0;
>> +
>> + if (cctx->enable_scte_104) {
>> + st = avformat_new_stream(avctx, NULL);
>> + if (!st) {
>> + av_log(avctx, AV_LOG_ERROR, "Cannot add data stream\n");
>> + ret = AVERROR(ENOMEM);
>> + goto error;
>> + }
>
> This is the only error path in the function, so the goto is superfluous.
Yeah, the goto was a product of some refactoring. I will get rid of it for the V2 series.
Thanks,
Devin
More information about the ffmpeg-devel
mailing list