mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 15:30:29 +02:00
Mpeg: Update videos to latest FFmpeg packet pump.
This commit is contained in:
1 parent
e3be3d5f7b
commit
0ab6f1d080
2 files changed
+30
-2
No files matched your search
@@ -993,7 +993,21 @@ static bool decodePmpVideo(PSPPointer<SceMpegRingBuffer> ringbuffer, u32 pmpctxA
|
||||
|
||||
|
||||
// decode video frame
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101)
|
||||
avcodec_send_packet(pCodecCtx, &packet);
|
||||
int len = avcodec_receive_frame(pCodecCtx, pFrame);
|
||||
if (len == 0) {
|
||||
len = pFrame->pkt_size;
|
||||
got_picture = 1;
|
||||
} else if (len == AVERROR(EAGAIN)) {
|
||||
len = 0;
|
||||
got_picture = 0;
|
||||
} else {
|
||||
got_picture = 0;
|
||||
}
|
||||
#else
|
||||
int len = avcodec_decode_video2(pCodecCtx, pFrame, &got_picture, &packet);
|
||||
#endif
|
||||
DEBUG_LOG(ME, "got_picture %d", got_picture);
|
||||
if (got_picture){
|
||||
SwsContext *img_convert_ctx = NULL;
|
||||
|
||||
Reference in new issue
Block a user