[FFmpeg-cvslog] avcodec/truemotion2: Don't check before freeing VLC
Andreas Rheinhardt
git at videolan.org
Mon Sep 11 02:02:34 EEST 2023
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Sep 8 15:29:17 2023 +0200| [e9bbb39e94555f5bc8eb58e74c44dde87e28040a] | committer: Andreas Rheinhardt
avcodec/truemotion2: Don't check before freeing VLC
ff_vlc_free() is of course compatible with freeing
a blank VLC.
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9bbb39e94555f5bc8eb58e74c44dde87e28040a
---
libavcodec/truemotion2.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 5527fed958..366d8aefc1 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -222,8 +222,7 @@ out:
static void tm2_free_codes(TM2Codes *code)
{
av_free(code->recode);
- if (code->vlc.table)
- ff_vlc_free(&code->vlc);
+ ff_vlc_free(&code->vlc);
}
static inline int tm2_get_token(GetBitContext *gb, TM2Codes *code)
More information about the ffmpeg-cvslog
mailing list