> On Nov 16, 2017, at 7:35 PM, Derek Buitenhuis <derek.buitenh...@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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to