Since you don't set m_pFormatCtx anywhere here, does this mean that you are creating a new decoder every frame (below find_decoder, avcodec_open2 etc)?  You really should keep it around and reuse it, otherwise you will get garbage because frames depend on earlier frames.