【问题标题】:FFMPEG 5 AVStream.cur_dts is removedFFMPEG 5 AVStream.cur_dts 被移除
【发布时间】:2022-10-15 06:48:59
【问题描述】:

在 ffmpeg 5+ 中,我注意到 AVStream 中的 cur_dts 字段已被删除,有人知道替代方法是什么吗?

目前我正在使用以下代码生成视频:

        if (packet->dts <= stream->cur_dts) {
        logD(RECORDER_TAG, "DTS not increasing, packet.dts:%d, cur:%d.", packet->dts,
             stream->cur_dts);
        ret = 0;
        av_packet_unref(packet);
        break;
    }

【问题讨论】:

    标签: ffmpeg


    【解决方案1】:

    根据 FFmpeg/libavformat/avformat.h 的更新历史

    这是一个私人领域。您不应该在 FFmpeg 代码之外使用它。

    2021 年 6 月 9 日提交:avformat:将 AVStream.{first,cur}_dts 移至 AVStream内部

    它们是私有字段,没有理由将它们公开 标题。

    这里:https://github.com/FFmpeg/FFmpeg/commit/591b88e6787c4e678237f02a50421d101abd25c2

    【讨论】:

      猜你喜欢
      • 2012-06-10
      • 1970-01-01
      • 2014-01-17
      • 2018-09-23
      • 2012-08-07
      相关资源
      最近更新 更多