fix when output enabled in encoder
Merge pull request #1054 from huili2/output_bs_enc

fix when output enabled in encoder