av_dict_set needs const char *, so really think we need c_str() here.