avformat/mpeg: move the header_str free into end label