[FFmpeg-devel] [PATCH] libavformat/hls: add support for SAMPLE-AES decryption in HLS demuxer

Nachiket Tarate nachiket.tarate at outlook.com
Sun Oct 11 23:15:18 EEST 2020



________________________________
From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> on behalf of Carl Eugen Hoyos <ceffmpeg at gmail.com>
Sent: Monday, October 12, 2020 12:46 AM
To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] libavformat/hls: add support for SAMPLE-AES decryption in HLS demuxer

Am Sa., 10. Okt. 2020 um 17:01 Uhr schrieb Nachiket Tarate
<nachiket.tarate at outlook.com>:

> -        pls->ctx->probesize = s->probesize > 0 ? s->probesize : 1024 * 4;
> -        pls->ctx->max_analyze_duration = s->max_analyze_duration > 0 ? s->max_analyze_duration : 4 * AV_TIME_BASE;
> -        pls->ctx->interrupt_callback = s->interrupt_callback;
> -        url = av_strdup(pls->segments[0]->url);
> -        ret = av_probe_input_buffer(&pls->pb, &in_fmt, url, NULL, 0, 0);
> -        av_free(url);
> -        if (ret < 0) {
> -            /* Free the ctx - it isn't initialized properly at this point,
> -             * so avformat_close_input shouldn't be called. If
> -             * avformat_open_input fails below, it frees and zeros the
> -             * context, so it doesn't need any special treatment like this. */
> -            av_log(s, AV_LOG_ERROR, "Error when loading first segment '%s'\n", pls->segments[0]->url);
> -            avformat_free_context(pls->ctx);
> -            pls->ctx = NULL;
> -            goto fail;

> +            pls->ctx->probesize = s->probesize > 0 ? s->probesize : 1024 * 4;
> +            pls->ctx->max_analyze_duration = s->max_analyze_duration > 0 ? s->max_analyze_duration : 4 * AV_TIME_BASE;
> +            pls->ctx->interrupt_callback = s->interrupt_callback;
> +            url = av_strdup(pls->segments[0]->url);
> +            ret = av_probe_input_buffer(&pls->pb, &in_fmt, url, NULL, 0, 0);
> +            av_free(url);
> +            if (ret < 0) {
> +                /* Free the ctx - it isn't initialized properly at this point,
> +                * so avformat_close_input shouldn't be called. If
> +                * avformat_open_input fails below, it frees and zeros the
> +                * context, so it doesn't need any special treatment like this. */
> +                av_log(s, AV_LOG_ERROR, "Error when loading first segment '%s'\n", pls->segments[0]->url);
> +                avformat_free_context(pls->ctx);
> +                pls->ctx = NULL;
> +                goto fail;

Please make the indentation change a separate patch.

Nachiket > This is not just indentation change. The original code block has been moved under else.

> +        }
> +        else {

Please merge these lines (several times in the patch).

Nachiket > I will do this.

Carl Eugen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list