Pass AVCodecContext to frame sinks

Frame consumers may need details about the frame format.

PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757>
This commit is contained in:
Romain Vimont
2023-02-25 16:19:58 +01:00
parent e22660d698
commit 619730edaf
4 changed files with 21 additions and 8 deletions

View File

@@ -330,7 +330,11 @@ 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);
(void) ctx;
struct sc_screen *screen = DOWNCAST(sink);
(void) screen;
#ifndef NDEBUG