[FFmpeg-cvslog] avcodec/ituh263enc: Use stack variable for custom_pcf
Andreas Rheinhardt
git at videolan.org
Sat Jan 29 21:02:19 EET 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Jan 25 03:49:14 2022 +0100| [769703613acc6af335c0d0a3eee4b0eaf59caed4] | committer: Andreas Rheinhardt
avcodec/ituh263enc: Use stack variable for custom_pcf
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=769703613acc6af335c0d0a3eee4b0eaf59caed4
---
libavcodec/ituh263enc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 5a7791111e..069c6a9acf 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -106,6 +106,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
int best_clock_code=1;
int best_divisor=60;
int best_error= INT_MAX;
+ int custom_pcf;
if(s->h263_plus){
for(i=0; i<2; i++){
@@ -120,7 +121,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
}
}
}
- s->custom_pcf= best_clock_code!=1 || best_divisor!=60;
+ custom_pcf = best_clock_code != 1 || best_divisor != 60;
coded_frame_rate= 1800000;
coded_frame_rate_base= (1000+best_clock_code)*best_divisor;
@@ -165,7 +166,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
else
put_bits(&s->pb, 3, format);
- put_bits(&s->pb,1, s->custom_pcf);
+ put_bits(&s->pb,1, custom_pcf);
put_bits(&s->pb,1, s->umvplus); /* Unrestricted Motion Vector */
put_bits(&s->pb,1,0); /* SAC: off */
put_bits(&s->pb,1,s->obmc); /* Advanced Prediction Mode */
@@ -203,7 +204,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
put_bits(&s->pb, 8, s->avctx->sample_aspect_ratio.den);
}
}
- if(s->custom_pcf){
+ if (custom_pcf) {
if(ufep){
put_bits(&s->pb, 1, best_clock_code);
put_bits(&s->pb, 7, best_divisor);
More information about the ffmpeg-cvslog
mailing list