diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-20 22:55:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-20 23:26:39 +0200 |
commit | 01770bfda02a72dc4c721e5cbd66ffa47b37002d (patch) | |
tree | 22a2e45dae3455fb6ed9458b95374b4136c2a493 | |
parent | 55b803e33ede35318f6afeadbe13fbb082eaaf20 (diff) | |
download | ffmpeg-01770bfda02a72dc4c721e5cbd66ffa47b37002d.tar.gz |
avcodec/snowenc: Do not write into const AVFrame
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/snowenc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 99d888906f..1f22ad55d1 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1557,7 +1557,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, { SnowContext *s = avctx->priv_data; RangeCoder * const c= &s->c; - AVFrame *pic = pict; + AVFrame *pic; const int width= s->avctx->width; const int height= s->avctx->height; int level, orientation, plane_index, i, y, ret; @@ -1584,6 +1584,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, } emms_c(); + pic = s->input_picture; + pic->pict_type = pict->pict_type; + pic->quality = pict->quality; s->m.picture_number= avctx->frame_number; if(avctx->flags&AV_CODEC_FLAG_PASS2){ @@ -1844,8 +1847,8 @@ redo_frame: ff_snow_release_buffer(avctx); s->current_picture->coded_picture_number = avctx->frame_number; - s->current_picture->pict_type = pict->pict_type; - s->current_picture->quality = pict->quality; + s->current_picture->pict_type = pic->pict_type; + s->current_picture->quality = pic->quality; s->m.frame_bits = 8*(s->c.bytestream - s->c.bytestream_start); s->m.p_tex_bits = s->m.frame_bits - s->m.misc_bits - s->m.mv_bits; s->m.current_picture.f->display_picture_number = |