Mercurial > libavcodec.hg
comparison h264.c @ 11509:9adad5749f23 libavcodec
Reinitialize the h264 decoder context on every valid aspect ratio
change, not only size changes.
Patch by Janusz Krzysztofik foo=zyszt <jkr$foo@tis.icnet.pl>.
author | stefano |
---|---|
date | Thu, 18 Mar 2010 23:36:54 +0000 |
parents | 2a4dc3c0b012 |
children | e9640e8aeea3 |
comparison
equal
deleted
inserted
replaced
11508:7be32921237f | 11509:9adad5749f23 |
---|---|
1772 s->height= 16*s->mb_height - 2*FFMIN(h->sps.crop_bottom, 7); | 1772 s->height= 16*s->mb_height - 2*FFMIN(h->sps.crop_bottom, 7); |
1773 else | 1773 else |
1774 s->height= 16*s->mb_height - 4*FFMIN(h->sps.crop_bottom, 3); | 1774 s->height= 16*s->mb_height - 4*FFMIN(h->sps.crop_bottom, 3); |
1775 | 1775 |
1776 if (s->context_initialized | 1776 if (s->context_initialized |
1777 && ( s->width != s->avctx->width || s->height != s->avctx->height)) { | 1777 && ( s->width != s->avctx->width || s->height != s->avctx->height |
1778 || av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) { | |
1778 if(h != h0) | 1779 if(h != h0) |
1779 return -1; // width / height changed during parallelized decoding | 1780 return -1; // width / height changed during parallelized decoding |
1780 free_tables(h); | 1781 free_tables(h); |
1781 flush_dpb(s->avctx); | 1782 flush_dpb(s->avctx); |
1782 MPV_common_end(s); | 1783 MPV_common_end(s); |