public void decodeVideoPacket(int pktLength, long pts)
        throws MpegVideoDecodeException
    {
        Statistics.startLog(DECODE_VIDEO_STRING);

        m_lPTS = pts;

	
        try
        {
	    if( !m_bRunMode )
		m_ioTool.nextStartCode();
        
            do
            {
		if( !m_bRunMode )
		{
		    parseSequenceHeader();
		    Statistics.endLog(DECODE_VIDEO_STRING );
		    return;
		}
		

                if( m_PelBuffer == null )
                {
                    setDim(m_iMbWidth*16, m_iMbHeight * 16, m_iWidth, m_iHeight);

                    m_PelBuffer = new int[3][3][m_iMbWidth*16*m_iMbHeight*16];
                
                    m_iPixelPerLumLine = m_iMbWidth << 4;
                    m_iPixelPerColLine = m_iMbWidth << 3;
                    m_iLumYincr = m_iPixelPerLumLine - 8;
                    m_iColYincr = m_iPixelPerColLine - 8;

                    m_forward.init( m_iPixelPerLumLine,
                                    m_iPixelPerColLine,
                                    m_iPixelPerLumLine - 16,
                                    m_iColYincr);

                    m_backward.init( m_iPixelPerLumLine,
                                     m_iPixelPerColLine,
                                     m_iPixelPerLumLine - 16,
                                     m_iColYincr);
                }
		

                while( (!m_ioTool.isEOF()) && m_ioTool.nextBits(GOP_START_CODE,32 ) )
                    parseGroupOfPictures();
            
            }
            while( (!m_ioTool.isEOF() ) && m_ioTool.nextBits(SEQ_START_CODE, 32 ) );

        }
        catch(IOException e)
        {
            throw new MpegVideoDecodeException(e.getMessage() );
        }
        finally
        {
            m_frameMgr.close();
        }
        Statistics.endLog(DECODE_VIDEO_STRING);
    }