mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-19 06:24:19 +01:00
Fix compilation error for old decoding API
Commitscb9c42bdcband441d3fb119updated the code only for the new decoding API.
This commit is contained in:
@@ -61,7 +61,7 @@ decoder_push(struct decoder *decoder, const AVPacket *packet) {
|
|||||||
#else
|
#else
|
||||||
int got_picture;
|
int got_picture;
|
||||||
int len = avcodec_decode_video2(decoder->codec_ctx,
|
int len = avcodec_decode_video2(decoder->codec_ctx,
|
||||||
decoder->video_buffer->decoding_frame,
|
decoder->video_buffer->producer_frame,
|
||||||
&got_picture,
|
&got_picture,
|
||||||
packet);
|
packet);
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
@@ -69,7 +69,7 @@ decoder_push(struct decoder *decoder, const AVPacket *packet) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (got_picture) {
|
if (got_picture) {
|
||||||
push_frame(decoder);
|
video_buffer_producer_offer_frame(decoder->video_buffer);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user