fixed build issues with FFMpeg AVCodec version >=59 changes (#636)
* fixed build issues with FFMpeg AVCodec version >=59 changes * fixed mistake of pushing stashed change --------- Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
eeecc3e8c8
Коммит
253e604c7b
@@ -387,7 +387,11 @@ rocDecStatus AvcodecVideoDecoder::NotifyNewSequence(AVFrame *p_frame) {
|
||||
p_video_format->frame_rate.denominator = dec_context_->framerate.den;
|
||||
p_video_format->bit_depth_luma_minus8 = BitDepthFromPixelFormat(dec_context_->pix_fmt) - 8;
|
||||
p_video_format->bit_depth_chroma_minus8 = p_video_format->bit_depth_luma_minus8;
|
||||
p_video_format->progressive_sequence = !p_frame->interlaced_frame;
|
||||
#if USE_AVCODEC_GREATER_THAN_58_134
|
||||
p_video_format->progressive_sequence = !(p_frame->flags & AV_FRAME_FLAG_INTERLACED);
|
||||
#else
|
||||
p_video_format->progressive_sequence = !!p_frame->interlaced_frame;;
|
||||
#endif
|
||||
//number of decode surfaces are internal and not exposed in avcodec based decoding. Setting some value for sanity
|
||||
p_video_format->min_num_decode_surfaces = dec_frames_.size();
|
||||
p_video_format->coded_width = p_frame->linesize[0];
|
||||
|
||||
@@ -462,7 +462,11 @@ class VideoDemuxer {
|
||||
|| !strcmp(av_fmt_input_ctx_->iformat->long_name, "Matroska / WebM"));
|
||||
|
||||
// Check if the input file allow seek functionality.
|
||||
#if USE_AVCODEC_GREATER_THAN_58_134
|
||||
is_seekable_ = true; //for latest version of FFMPeg, read_seek and read_seek2 is not exposed in AVFormatContext
|
||||
#else
|
||||
is_seekable_ = av_fmt_input_ctx_->iformat->read_seek || av_fmt_input_ctx_->iformat->read_seek2;
|
||||
#endif
|
||||
|
||||
if (is_h264_) {
|
||||
const AVBitStreamFilter *bsf = av_bsf_get_by_name("h264_mp4toannexb");
|
||||
|
||||
Ссылка в новой задаче
Block a user