[FFmpeg-cvslog] avcodec/ituh263enc: Use stack variable for aspect_ratio_info

Andreas Rheinhardt git at videolan.org
Sat Jan 29 21:02:30 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Jan 25 13:22:10 2022 +0100| [f2da6502580504f271c102160d4b1421f602cf5b] | committer: Andreas Rheinhardt

avcodec/ituh263enc: Use stack variable for aspect_ratio_info

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2da6502580504f271c102160d4b1421f602cf5b
---

 libavcodec/ituh263enc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 069c6a9acf..bd2deba210 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -193,13 +193,13 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
 
         if (format == 8) {
             /* Custom Picture Format (CPFMT) */
-            s->aspect_ratio_info= ff_h263_aspect_to_info(s->avctx->sample_aspect_ratio);
+            unsigned aspect_ratio_info = ff_h263_aspect_to_info(s->avctx->sample_aspect_ratio);
 
-            put_bits(&s->pb,4,s->aspect_ratio_info);
+            put_bits(&s->pb,4, aspect_ratio_info);
             put_bits(&s->pb,9,(s->width >> 2) - 1);
             put_bits(&s->pb,1,1); /* "1" to prevent start code emulation */
             put_bits(&s->pb,9,(s->height >> 2));
-            if (s->aspect_ratio_info == FF_ASPECT_EXTENDED){
+            if (aspect_ratio_info == FF_ASPECT_EXTENDED){
                 put_bits(&s->pb, 8, s->avctx->sample_aspect_ratio.num);
                 put_bits(&s->pb, 8, s->avctx->sample_aspect_ratio.den);
             }



More information about the ffmpeg-cvslog mailing list