fix defect7654 that  the encoder won't generate IDR when temporal layer setting changes
remove redundant code
format update
Merge pull request #1006 from ruil2/bug_fix

    fix defect7654 that  the encoder won't generate IDR when temporal layer setting changes