# HG changeset patch # User nicodvb # Date 1142118957 0 # Node ID 8f2e94a4a4c1ee009e0f1cb70b6feeba2041e1b2 # Parent f34f618434489b002f7fa8ddc5bd4c977e622ab4 check pce_ptr before using it; fixes cid 207 diff -r f34f61843448 -r 8f2e94a4a4c1 libmpdemux/muxer_mpeg.c --- a/libmpdemux/muxer_mpeg.c Sat Mar 11 22:43:28 2006 +0000 +++ b/libmpdemux/muxer_mpeg.c Sat Mar 11 23:15:57 2006 +0000 @@ -1794,6 +1794,9 @@ uint8_t fps, tff, rff; int period; + if(! pce_ptr) + return 0; + period = (vpriv->telecine == TELECINE_FILM2PAL) ? 12 : 4; if(fps_ptr != NULL) { @@ -1829,8 +1832,6 @@ if(se_ptr) se_ptr[1] &= 0xf7; - if(! pce_ptr) - return 0; if(! vpriv->vframes) //initial value of tff vpriv->trf = (pce_ptr[3] >> 6) & 0x2;