[FFmpeg-devel] [PATCH] avformat/hls: Re-use crypto URLContext

Michael Niedermayer michael at niedermayer.cc
Fri Sep 29 19:25:32 EEST 2023


On Fri, Sep 29, 2023 at 05:10:18PM +0200, Luis Scheurenbrand via ffmpeg-devel wrote:
> Reset crypto state and keep nested http context alive.
> Previously, an unencrypted file, followed by an encrypted file would
> result in a corrupted stream, as the stream would not be closed and
> an encrypted file would be forwarded to the demuxer.
> 
> fixes: https://trac.ffmpeg.org/ticket/10599
> fixes: https://trac.ffmpeg.org/ticket/8490
> Signed-off-by: Luis Scheurenbrand <luis at scheurenbrand.me>
> ---
>  libavformat/crypto.c | 55 ++++++++++++++++++++++++++++++++++++++++++++
>  libavformat/crypto.h | 38 ++++++++++++++++++++++++++++++
>  libavformat/hls.c    | 32 ++++++++++++++++++++++----
>  3 files changed, 120 insertions(+), 5 deletions(-)
>  create mode 100644 libavformat/crypto.h
> 
> diff --git a/libavformat/crypto.c b/libavformat/crypto.c
> index 75b00020bc..543300c7c0 100644
> --- a/libavformat/crypto.c
> +++ b/libavformat/crypto.c
> @@ -20,8 +20,10 @@
>   */
>   #include "libavutil/aes.h"
> +#include "libavutil/avassert.h"
>  #include "libavutil/avstring.h"
>  #include "libavutil/opt.h"
> +#include "crypto.h"
>  #include "url.h"
>   // encourage reads of 4096 bytes - 1 block is always retained.
> @@ -105,6 +107,59 @@ static int set_aes_arg(URLContext *h, uint8_t **buf,
> int *buf_len,
>      return 0;

this patch is corrupted with newlines, check the word/line wraping settings
of your mail setup

Applying: avformat/hls: Re-use crypto URLContext
error: corrupt patch at line 21
error: could not build fake ancestor

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230929/35b4b538/attachment.sig>


More information about the ffmpeg-devel mailing list