From df6b44182e1f52e6982a55e9720d9e46620a0d8a Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 25 Feb 2021 18:12:11 +0100 Subject: avcodec, avformat: Remove AVPacket.convergence_duration Deprecated in 948f3c19a8bd069768ca411212aaf8c1ed96b10d. Signed-off-by: Andreas Rheinhardt Signed-off-by: James Almer --- libavformat/matroskadec.c | 8 -------- libavformat/matroskaenc.c | 8 -------- libavformat/srtenc.c | 7 ------- libavformat/utils.c | 6 ------ 4 files changed, 29 deletions(-) (limited to 'libavformat') diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e8c76f9cfb..116e331215 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3572,14 +3572,6 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska, pkt->pos = pos; pkt->duration = lace_duration; -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (st->codecpar->codec_id == AV_CODEC_ID_SUBRIP) { - pkt->convergence_duration = lace_duration; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - res = avpriv_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, NULL, 0); if (res < 0) { av_packet_unref(pkt); diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 0141fb0b8d..b36e86ecb1 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2372,14 +2372,6 @@ static int mkv_write_packet_internal(AVFormatContext *s, const AVPacket *pkt) mkv_blockgroup_size(pkt->size, track->track_num_size)); -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - /* For backward compatibility, prefer convergence_duration. */ - if (pkt->convergence_duration > 0) { - duration = pkt->convergence_duration; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif /* All subtitle blocks are considered to be keyframes. */ mkv_write_block(s, pb, MATROSKA_ID_BLOCK, pkt, 1); put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, duration); diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c index 484dd4d230..9bb0ff94c1 100644 --- a/libavformat/srtenc.c +++ b/libavformat/srtenc.c @@ -73,13 +73,6 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt) y2 = AV_RL32(p + 12); } -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (d <= 0) - /* For backward compatibility, fallback to convergence_duration. */ - d = pkt->convergence_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (s == AV_NOPTS_VALUE || d < 0) { av_log(avf, AV_LOG_WARNING, "Insufficient timestamps in event number %d.\n", srt->index); diff --git a/libavformat/utils.c b/libavformat/utils.c index 02768aca1f..322ccd3af2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1439,12 +1439,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, /* update flags */ if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA || ff_is_intra_only(st->codecpar->codec_id)) pkt->flags |= AV_PKT_FLAG_KEY; -#if FF_API_CONVERGENCE_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (pc) - pkt->convergence_duration = pc->convergence_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif } /** -- cgit v1.2.3