Fix usage of deprecated AVFrame::pkt_duration
Uses a macro to check FFMpeg version before setting AVFrame::duration or AVFrame::pkt_duration.
This commit is contained in:
parent
2e03098540
commit
1d27fd3b21
1 changed files with 4 additions and 0 deletions
|
@ -614,7 +614,11 @@ std::tuple<bool, std::vector<AVFrame *>> Video::HandleDecodingPacket(
|
|||
// cleanup
|
||||
av_frame_free(&temp_frame);
|
||||
yuv_frame->pts = frame_count_ - 1;
|
||||
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(58, 2, 100)
|
||||
yuv_frame->pkt_duration = 1;
|
||||
#else
|
||||
yuv_frame->duration = 1;
|
||||
#endif
|
||||
return_frames.push_back(yuv_frame);
|
||||
} // else (!output_as_pngs)
|
||||
} // while (return_value >= 0)
|
||||
|
|
Loading…
Reference in a new issue