Hi 0xBat On Mon, Jan 05, 2026 at 02:11:42AM +0100, 0xBat via ffmpeg-devel wrote: > Ensure the allocated AVCodecContext is properly freed if > avcodec_parameters_to_context fails. > > Signed-off-by: 0xBat <[email protected]> > --- > doc/examples/extract_mvs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c > index 5603064d72..b5ed2c5549 100644 > --- a/doc/examples/extract_mvs.c > +++ b/doc/examples/extract_mvs.c > @@ -109,6 +109,7 @@ static int open_codec_context(AVFormatContext *fmt_ctx, > enum AVMediaType type) > ret = avcodec_parameters_to_context(dec_ctx, st->codecpar); > if (ret < 0) { > fprintf(stderr, "Failed to copy codec parameters to codec > context\n"); > + avcodec_free_context(&dec_ctx); > return ret; > }
will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
