Skip to content

Commit

Permalink
deprecated;
Browse files Browse the repository at this point in the history
  • Loading branch information
RealChuan committed Dec 11, 2023
1 parent c8a85f8 commit 4a6c093
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ffmpeg/frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ void Frame::copyPropsFrom(Frame *src)

av_frame_copy_props(d_ptr->frame, srcFrame);
d_ptr->frame->pts = srcFrame->pts;
d_ptr->frame->pkt_duration = srcFrame->pkt_duration;
d_ptr->frame->duration = srcFrame->duration;
d_ptr->frame->pict_type = srcFrame->pict_type;
d_ptr->frame->key_frame = srcFrame->key_frame;
d_ptr->frame->flags = srcFrame->flags;
d_ptr->frame->width = srcFrame->width;
d_ptr->frame->height = srcFrame->height;
d_ptr->frame->time_base = srcFrame->time_base;
Expand Down Expand Up @@ -168,12 +168,12 @@ auto Frame::pts() -> qint64

void Frame::setDuration(qint64 duration)
{
d_ptr->frame->pkt_duration = duration;
d_ptr->frame->duration = duration;
}

auto Frame::duration() -> qint64
{
return d_ptr->frame->pkt_duration;
return d_ptr->frame->duration;
}

void Frame::destroyFrame()
Expand Down Expand Up @@ -211,7 +211,7 @@ auto Frame::getBuffer() -> bool

auto Frame::isKey() -> bool
{
return d_ptr->frame->key_frame == 1;
return d_ptr->frame->flags == AV_FRAME_FLAG_KEY;
}

auto Frame::avFrame() -> AVFrame *
Expand Down

0 comments on commit 4a6c093

Please sign in to comment.