tor 2023-12-28 klockan 18:23 +0100 skrev Tomas Härdin: > +static int apc_write_trailer(AVFormatContext *s) > +{ > + int64_t file_size = avio_tell(s->pb); > + > + // write length, if we're able to seek back > + if (avio_seek(s->pb, 12, SEEK_SET) >= 0) { > + int64_t data_size = file_size -= APC_HEADER_SIZE;
I realized a small bug right after posting: data_size can become negative if the file is closed immediately after opening. Will fix this when reposting the series /Tomas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".