mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 12:39:55 +00:00
Revert "Use the decoded frame pts when available"
This reverts commit cab68df2574eec34254640770ca371450b341f42.
This commit is contained in:
parent
9d6f656822
commit
27cd9ff732
@ -620,12 +620,11 @@ public:
|
|||||||
if (avcodec_decode_video2(is->video_st->codec, pFrame, &frameFinished, packet) < 0)
|
if (avcodec_decode_video2(is->video_st->codec, pFrame, &frameFinished, packet) < 0)
|
||||||
throw std::runtime_error("Error decoding video frame");
|
throw std::runtime_error("Error decoding video frame");
|
||||||
|
|
||||||
if((uint64_t)pFrame->pts != AV_NOPTS_VALUE)
|
if((uint64_t)packet->dts == AV_NOPTS_VALUE &&
|
||||||
pts = pFrame->pts;
|
pFrame->opaque && *(uint64_t*)pFrame->opaque != AV_NOPTS_VALUE)
|
||||||
else if((uint64_t)packet->pts != AV_NOPTS_VALUE)
|
|
||||||
pts = packet->pts;
|
|
||||||
else if(pFrame->opaque && *(uint64_t*)pFrame->opaque != AV_NOPTS_VALUE)
|
|
||||||
pts = *(uint64_t *)pFrame->opaque;
|
pts = *(uint64_t *)pFrame->opaque;
|
||||||
|
else if((uint64_t)packet->dts != AV_NOPTS_VALUE)
|
||||||
|
pts = packet->dts;
|
||||||
else
|
else
|
||||||
pts = 0;
|
pts = 0;
|
||||||
pts *= av_q2d(is->video_st->time_base);
|
pts *= av_q2d(is->video_st->time_base);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user