[FFmpeg-devel] [PATCH 22/35] fftools/ffmpeg: rework -shortest implementation

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri Jun 17 00:05:32 EEST 2022


Anton Khirnov:
> +struct SyncQueue {
> +    enum SyncQueueType type;
> +
> +    /* no more frames will be sent for any stream */
> +    int finished;
> +    /* sync head: the stream with the _smallest_ head timestamp
> +     * this stream determines which frames can be output */
> +    int head_stream;
> +    /* the finished stream with the smallest finish timestamp or -1 */
> +    int head_finished_stream;
> +
> +    // maximum buffering duration in microseconds
> +    int64_t buf_size_us;
> +
> +    SyncQueueStream *streams;
> +    unsigned int  nb_streams;
> +
> +    // pool of preallocated frames to avoid constant allocations
> +    ObjPool *pool;
> +    SyncQueueFrame  free_frames[32];
> +    unsigned int nb_free_frames;

The free_frames stuff seems unused.

> +};
> +


More information about the ffmpeg-devel mailing list