Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UE5.2 android shipping Exited #54

Open
tsxy2007 opened this issue Sep 6, 2023 · 0 comments
Open

UE5.2 android shipping Exited #54

tsxy2007 opened this issue Sep 6, 2023 · 0 comments

Comments

@tsxy2007
Copy link

tsxy2007 commented Sep 6, 2023

int FFFMPEGMediaTracks::VideoThread() {
//dasdwf
AVFrame *frame = av_frame_alloc();
double pts;
double duration;
int ret;
AVRational tb = videoStream->time_base;
AVRational frame_rate = av_guess_frame_rate(FormatContext, videoStream, NULL);

if (!frame) {
    return AVERROR(ENOMEM);
}

for (;;) {
    ret = GetVideoFrame(frame,FormatContext);
  // **Exited** 
    if (ret < 0) {
        av_frame_free(&frame);
        break;
    }
    if (!ret)
    {
        continue;
        
    }

    duration = (frame_rate.num && frame_rate.den ? av_q2d({ frame_rate.den, frame_rate.num }) : 0);
    pts = (frame->pts == AV_NOPTS_VALUE) ? NAN : frame->pts * av_q2d(tb);
    ret = pictq.QueuePicture(frame, pts, duration, frame->pkt_pos, viddec->GetPktSerial());

    av_frame_unref(frame);

    if (ret < 0) {
        av_frame_free(&frame);
        break;
    }
}
av_frame_free(&frame);
return 0;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant