]> git.sesse.net Git - ffmpeg/commit
avcodec/roqvideodec: Move transient GetByteContext to the stack
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 30 Aug 2020 12:06:11 +0000 (14:06 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 31 Aug 2020 00:59:36 +0000 (02:59 +0200)
commita067d449558ac4ff69b53c7e09fdd6396d6f7c0c
tree0b8f5c3042bf263bf1e15189628ae7bb8bf5bd92
parent72942ad6d4b243389d84e7e95641152ad9148bd9
avcodec/roqvideodec: Move transient GetByteContext to the stack

This avoids keeping potentially dangling pointers in the context,
beautifies the code (by replacing "&ri->gb" by gb for every access to
the GetByteContext) and also highlights the GetByteContext's short-lived
nature better.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/roqvideo.h
libavcodec/roqvideodec.c