Log av_write_frame failure

Refs #2218 <https://github.com/Genymobile/scrcpy/issues/2218>
This commit is contained in:
Romain Vimont 2021-04-01 23:18:37 +02:00
parent b77932a5b7
commit 3c8f996822

View File

@ -252,7 +252,13 @@ recorder_write(struct recorder *recorder, AVPacket *packet) {
}
recorder_rescale_packet(recorder, packet);
return av_write_frame(recorder->ctx, packet) >= 0;
int ret = av_write_frame(recorder->ctx, packet);
if (ret < 0) {
LOGE("Could not write frame: %d\n", ret);
return false;
}
return true;
}
static int