You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avformat/vorbiscomment: Don't compute strlen twice
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
		| @@ -66,9 +66,10 @@ int ff_vorbiscomment_write(AVIOContext *pb, const AVDictionary *m, | ||||
|                            const char *vendor_string, | ||||
|                            AVChapter **chapters, unsigned int nb_chapters) | ||||
| { | ||||
|     size_t vendor_string_length = strlen(vendor_string); | ||||
|     int cm_count = 0; | ||||
|     avio_wl32(pb, strlen(vendor_string)); | ||||
|     avio_write(pb, vendor_string, strlen(vendor_string)); | ||||
|     avio_wl32(pb, vendor_string_length); | ||||
|     avio_write(pb, vendor_string, vendor_string_length); | ||||
|     if (chapters && nb_chapters) { | ||||
|         for (int i = 0; i < nb_chapters; i++) { | ||||
|             cm_count += av_dict_count(chapters[i]->metadata) + 1; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user