mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-14 02:50:11 +01:00
avcodec/svq1enc: Do not print debug RD value before it has been computed
Avoids floating point division by 0
Fixes: Ticket8191
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c297f7e57a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -487,9 +487,10 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx)
|
|||||||
SVQ1EncContext *const s = avctx->priv_data;
|
SVQ1EncContext *const s = avctx->priv_data;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
av_log(avctx, AV_LOG_DEBUG, "RD: %f\n",
|
if (avctx->frame_number)
|
||||||
s->rd_total / (double)(avctx->width * avctx->height *
|
av_log(avctx, AV_LOG_DEBUG, "RD: %f\n",
|
||||||
avctx->frame_number));
|
s->rd_total / (double)(avctx->width * avctx->height *
|
||||||
|
avctx->frame_number));
|
||||||
|
|
||||||
s->m.mb_type = NULL;
|
s->m.mb_type = NULL;
|
||||||
ff_mpv_common_end(&s->m);
|
ff_mpv_common_end(&s->m);
|
||||||
|
|||||||
Reference in New Issue
Block a user