aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2010-03-18 23:36:54 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-03-18 23:36:54 +0000
commit5388f0b479c56179d566c49afd8765fefef4a18e (patch)
tree35ee3292760ad7687b4950556bb875af097ffeb6 /libavcodec
parent15ba015f71c951aa4e092fbb79113f5573f5df9f (diff)
downloadffmpeg-5388f0b479c56179d566c49afd8765fefef4a18e.tar.gz
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>. Originally committed as revision 22597 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 9fe7c22208..4cd2933933 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1774,7 +1774,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
s->height= 16*s->mb_height - 4*FFMIN(h->sps.crop_bottom, 3);
if (s->context_initialized
- && ( s->width != s->avctx->width || s->height != s->avctx->height)) {
+ && ( s->width != s->avctx->width || s->height != s->avctx->height
+ || av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) {
if(h != h0)
return -1; // width / height changed during parallelized decoding
free_tables(h);