avcodec/snowenc: Do not write into const AVFrame
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
55b803e33e
commit
01770bfda0
@ -1557,7 +1557,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
{
|
{
|
||||||
SnowContext *s = avctx->priv_data;
|
SnowContext *s = avctx->priv_data;
|
||||||
RangeCoder * const c= &s->c;
|
RangeCoder * const c= &s->c;
|
||||||
AVFrame *pic = pict;
|
AVFrame *pic;
|
||||||
const int width= s->avctx->width;
|
const int width= s->avctx->width;
|
||||||
const int height= s->avctx->height;
|
const int height= s->avctx->height;
|
||||||
int level, orientation, plane_index, i, y, ret;
|
int level, orientation, plane_index, i, y, ret;
|
||||||
@ -1584,6 +1584,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
|
|
||||||
}
|
}
|
||||||
emms_c();
|
emms_c();
|
||||||
|
pic = s->input_picture;
|
||||||
|
pic->pict_type = pict->pict_type;
|
||||||
|
pic->quality = pict->quality;
|
||||||
|
|
||||||
s->m.picture_number= avctx->frame_number;
|
s->m.picture_number= avctx->frame_number;
|
||||||
if(avctx->flags&AV_CODEC_FLAG_PASS2){
|
if(avctx->flags&AV_CODEC_FLAG_PASS2){
|
||||||
@ -1844,8 +1847,8 @@ redo_frame:
|
|||||||
ff_snow_release_buffer(avctx);
|
ff_snow_release_buffer(avctx);
|
||||||
|
|
||||||
s->current_picture->coded_picture_number = avctx->frame_number;
|
s->current_picture->coded_picture_number = avctx->frame_number;
|
||||||
s->current_picture->pict_type = pict->pict_type;
|
s->current_picture->pict_type = pic->pict_type;
|
||||||
s->current_picture->quality = pict->quality;
|
s->current_picture->quality = pic->quality;
|
||||||
s->m.frame_bits = 8*(s->c.bytestream - s->c.bytestream_start);
|
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.p_tex_bits = s->m.frame_bits - s->m.misc_bits - s->m.mv_bits;
|
||||||
s->m.current_picture.f->display_picture_number =
|
s->m.current_picture.f->display_picture_number =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user