Move decoder frame to decoder
The video buffer held 3 frames:
- the producer frame (for decoding)
- the pending frame (to exchange between the producer and consumer)
- the consumer frame (for rendering)
It worked well, but it prevented video buffers to be chained, because
the consumer frame of the first video buffer must be the same as the
producer frame of the second video buffer.
To solve this problem, make the decoder handle its decoding frame, and
keep only the pending and consumer frames in the video_buffer.
decoder -> pending -> consumer -> pending -> consumer
|---------------------||---------------------|
video_buffer 1 video_buffer 2
This paves the way to support asynchronous swscale.
This commit is contained in:
@@ -11,6 +11,7 @@ struct video_buffer;
|
||||
struct decoder {
|
||||
struct video_buffer *video_buffer;
|
||||
AVCodecContext *codec_ctx;
|
||||
AVFrame *frame;
|
||||
};
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user