Display and control your Android device
Fix segfault on recording with old FFmpeg
Romain Vimonta9c8fa305d23
diff --git a/app/src/recorder.c b/app/src/recorder.cindex 0de05d81..0d4e4e68 100644--- a/app/src/recorder.c+++ b/app/src/recorder.c@@ -33,6 +33,11 @@ record_packet_new(const AVPacket *packet) {if (!rec) {return NULL;}++ // av_packet_ref() does not initialize all fields in old FFmpeg versions+ // See <https://github.com/Genymobile/scrcpy/issues/707>+ av_init_packet(&rec->packet);+if (av_packet_ref(&rec->packet, packet)) {SDL_free(rec);return NULL;