Unified · Split
| @@ -66,9 +66,10 @@ int ff_vorbiscomment_write(AVIOContext *pb, const AVDictionary *m, · 65 unmodified lines | ||
| 66 | 66 | const char *vendor_string, |
| 67 | 67 | AVChapter **chapters, unsigned int nb_chapters) |
| 68 | 68 | { |
| 69 | + size_t vendor_string_length = strlen(vendor_string); | |
| 69 | 70 | int cm_count = 0; |
| 70 | − avio_wl32(pb, strlen(vendor_string)); | |
| 71 | − avio_write(pb, vendor_string, strlen(vendor_string)); | |
| 71 | + avio_wl32(pb, vendor_string_length); | |
| 72 | + avio_write(pb, vendor_string, vendor_string_length); | |
| 72 | 73 | if (chapters && nb_chapters) { |
| 73 | 74 | for (int i = 0; i < nb_chapters; i++) { |
| 74 | 75 | cm_count += av_dict_count(chapters[i]->metadata) + 1; |