summaryrefslogtreecommitdiff
path: root/libavcodec/ituh263enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-25 03:49:14 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-29 18:34:30 +0100
commit769703613acc6af335c0d0a3eee4b0eaf59caed4 (patch)
tree4251f80f8f12cab1844424bd57f65a9e3b24b1af /libavcodec/ituh263enc.c
parent426d65e3e3d72e9d00a54875ff121a8c8425ad50 (diff)
avcodec/ituh263enc: Use stack variable for custom_pcf
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/ituh263enc.c')
-rw-r--r--libavcodec/ituh263enc.c7
1 files 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);