lavc: add ff_bprint_to_extradata() helper and use it.