Use av_strdup to allocate string, prevents the warning: