Write header file with correct extradata

When recording, the header must be written with extradata set to the
content of the very first packet.

Suggested-by: Steve Lhomme <robux4@ycbcr.xyz>

Fixes <https://github.com/Genymobile/scrcpy/issues/351>
Fixes <https://github.com/Genymobile/scrcpy/issues/416>
This commit is contained in:
Romain Vimont
2019-02-09 12:54:12 +01:00
parent ee3cba57a8
commit c8f0805b89
2 changed files with 54 additions and 15 deletions

View File

@@ -10,6 +10,7 @@ struct recorder {
char *filename;
AVFormatContext *ctx;
struct size declared_frame_size;
SDL_bool header_written;
};
SDL_bool recorder_init(struct recorder *recoder, const char *filename,