Mpeg: Update videos to latest FFmpeg packet pump.

This commit is contained in:
Unknown W. Brackets committed 2021-02-18 00:20:27 -08:00
1 parent e3be3d5f7b
commit 0ab6f1d080
2 files changed
+30 -2

No files matched your search

+14
View File
@@ -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;