diff options
Diffstat (limited to 'libavcodec/svq1enc.c')
-rw-r--r-- | libavcodec/svq1enc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index a74d0e4e10..f391c95536 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -574,6 +574,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, { SVQ1EncContext *const s = avctx->priv_data; int i, ret; + uint8_t *sd; if ((ret = ff_alloc_packet2(avctx, pkt, s->y_block_width * s->y_block_height * MAX_MB_BYTES*3 + FF_MIN_BUFFER_SIZE)) < 0) @@ -613,6 +614,11 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, avctx->coded_frame->pict_type = s->pict_type; avctx->coded_frame->key_frame = s->pict_type == AV_PICTURE_TYPE_I; + sd = av_packet_new_side_data(pkt, AV_PKT_DATA_QUALITY_FACTOR, sizeof(int)); + if (!sd) + return AVERROR(ENOMEM); + *(int *)sd = pict->quality; + svq1_write_header(s, s->pict_type); for (i = 0; i < 3; i++) if (svq1_encode_plane(s, i, |