mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-25 16:42:14 +00:00
Unref last packet on exit
This commit is contained in:
parent
15014f2689
commit
73c332e3e4
@ -91,7 +91,11 @@ static int run_decoder(void *data) {
|
||||
packet.data = NULL;
|
||||
packet.size = 0;
|
||||
|
||||
while (!av_read_frame(format_ctx, &packet) && !avio_ctx->eof_reached) {
|
||||
while (!av_read_frame(format_ctx, &packet)) {
|
||||
if (avio_ctx->eof_reached) {
|
||||
av_packet_unref(&packet);
|
||||
goto run_quit;
|
||||
}
|
||||
// the new decoding/encoding API has been introduced by:
|
||||
// <http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=7fc329e2dd6226dfecaa4a1d7adf353bf2773726>
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 37, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user