Hi, On Mon, Mar 19, 2012 at 4:52 PM, Ronald S. Bultje <[email protected]> wrote: > @@ -2382,15 +2383,18 @@ static inline int vc1_pred_dc(MpegEncContext *s, int > overlap, int pq, int n, > a = dc_val[ - wrap]; > /* scale predictors if needed */ > q1 = s->current_picture.f.qscale_table[mb_pos]; > + dqscale_index = s->y_dc_scale_table[q1] - 1; > + if (dqscale_index < 0) > + return AVERROR_INVALIDDATA; [..] > /* Prediction */ > - dcdiff += vc1_pred_dc(&v->s, v->overlap, mquant, n, v->a_avail, > v->c_avail, &dc_val, &dc_pred_dir); > + pred = vc1_pred_dc(&v->s, v->overlap, mquant, n, v->a_avail, v->c_avail, > &dc_val, &dc_pred_dir); > + if (pred < 0) > + return pred; > + dcdiff += pred;
I had to revert this; pred can very well be negative, and there's nothing wrong with that. So I replaced it with a "return 0;" in vc1_pred_dc(), plus amended for Hendrik's comments. Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
