[FFmpeg-devel] [PATCH 3/6] Add CRYO APC muxer

Tomas Härdin git at haerdin.se
Thu Dec 28 19:29:52 EET 2023


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


More information about the ffmpeg-devel mailing list