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 c297f7e57a223da9f0d350e30456d60c8c87f902) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b2094c5415
commit
d2e90cde29
@ -486,6 +486,7 @@ 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;
|
||||||
|
|
||||||
|
if (avctx->frame_number)
|
||||||
av_log(avctx, AV_LOG_DEBUG, "RD: %f\n",
|
av_log(avctx, AV_LOG_DEBUG, "RD: %f\n",
|
||||||
s->rd_total / (double)(avctx->width * avctx->height *
|
s->rd_total / (double)(avctx->width * avctx->height *
|
||||||
avctx->frame_number));
|
avctx->frame_number));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user