Pass AVCodecContext to frame sinks

Frame consumers may need details about the frame format.
This commit is contained in:
Romain Vimont
2023-02-25 16:19:58 +01:00
parent 84703fe6af
commit 34ab105d10
4 changed files with 17 additions and 6 deletions

View File

@@ -330,7 +330,10 @@ event_watcher(void *data, SDL_Event *event) {
#endif
static bool
sc_screen_frame_sink_open(struct sc_frame_sink *sink) {
sc_screen_frame_sink_open(struct sc_frame_sink *sink,
const AVCodecContext *ctx) {
assert(ctx->pix_fmt == AV_PIX_FMT_YUV420P);
struct sc_screen *screen = DOWNCAST(sink);
(void) screen;
#ifndef NDEBUG