Mercurial > libavcodec.hg
changeset 2229:5ca45491294b libavcodec
qprd + mpeg2 segfault fix
author | michael |
---|---|
date | Tue, 14 Sep 2004 17:17:12 +0000 |
parents | f9411c92f7e6 |
children | 53f407cf1f18 |
files | mpegvideo.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo.c Tue Sep 14 06:58:24 2004 +0000 +++ b/mpegvideo.c Tue Sep 14 17:17:12 2004 +0000 @@ -4408,7 +4408,7 @@ if(qp < s->avctx->qmin || qp > s->avctx->qmax) break; backup_s.dquant= dquant; - if(s->mb_intra){ + if(s->mb_intra && s->dc_val[0]){ for(i=0; i<6; i++){ dc[i]= s->dc_val[0][ s->block_index[i] ]; memcpy(ac[i], s->ac_val[0][s->block_index[i]], sizeof(DCTELEM)*16); @@ -4418,7 +4418,7 @@ encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_INTER /* wrong but unused */, pb, pb2, tex_pb, &dmin, &next_block, s->mv[mvdir][0][0], s->mv[mvdir][0][1]); if(best_s.qscale != qp){ - if(s->mb_intra){ + if(s->mb_intra && s->dc_val[0]){ for(i=0; i<6; i++){ s->dc_val[0][ s->block_index[i] ]= dc[i]; memcpy(s->ac_val[0][s->block_index[i]], ac[i], sizeof(DCTELEM)*16);