comparison h264.c @ 8231:0df3402e6b41 libavcodec

Fix segfault due to deallocated entries in delayed_pic after size change. Fixes issue714.
author michael
date Sun, 30 Nov 2008 23:51:02 +0000
parents 018299720403
children 4a8f9bbc5e81
comparison
equal deleted inserted replaced
8230:72949bacc1b9 8231:0df3402e6b41
3637 if (s->context_initialized 3637 if (s->context_initialized
3638 && ( s->width != s->avctx->width || s->height != s->avctx->height)) { 3638 && ( s->width != s->avctx->width || s->height != s->avctx->height)) {
3639 if(h != h0) 3639 if(h != h0)
3640 return -1; // width / height changed during parallelized decoding 3640 return -1; // width / height changed during parallelized decoding
3641 free_tables(h); 3641 free_tables(h);
3642 flush_dpb(s->avctx);
3642 MPV_common_end(s); 3643 MPV_common_end(s);
3643 } 3644 }
3644 if (!s->context_initialized) { 3645 if (!s->context_initialized) {
3645 if(h != h0) 3646 if(h != h0)
3646 return -1; // we cant (re-)initialize context during parallel decoding 3647 return -1; // we cant (re-)initialize context during parallel decoding