]> git.sesse.net Git - ffmpeg/commitdiff
avcodec, avformat: Remove AVPacket.convergence_duration
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 25 Feb 2021 17:12:11 +0000 (18:12 +0100)
committerJames Almer <jamrial@gmail.com>
Tue, 27 Apr 2021 13:43:00 +0000 (10:43 -0300)
Deprecated in 948f3c19a8bd069768ca411212aaf8c1ed96b10d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/avcodec.h
libavcodec/avpacket.c
libavcodec/packet.h
libavcodec/parser.c
libavcodec/version.h
libavformat/matroskadec.c
libavformat/matroskaenc.c
libavformat/srtenc.c
libavformat/utils.c

index b46b858416401580df65229950879122c31105c9..81a18e2cde1fff7d6ee4691ffe3e44aea3941d1c 100644 (file)
@@ -3386,14 +3386,6 @@ typedef struct AVCodecParserContext {
      */
     int key_frame;
 
-#if FF_API_CONVERGENCE_DURATION
-    /**
-     * @deprecated unused
-     */
-    attribute_deprecated
-    int64_t convergence_duration;
-#endif
-
     // Timestamp generation support:
     /**
      * Synchronization point for start of timestamp generation.
index b5bac5c5f282787c8af357d59f8b4819713aceff..b726a8db0ea901371267dd612248db68d3d9a9d2 100644 (file)
@@ -39,11 +39,6 @@ void av_init_packet(AVPacket *pkt)
     pkt->dts                  = AV_NOPTS_VALUE;
     pkt->pos                  = -1;
     pkt->duration             = 0;
-#if FF_API_CONVERGENCE_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    pkt->convergence_duration = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     pkt->flags                = 0;
     pkt->stream_index         = 0;
     pkt->buf                  = NULL;
@@ -605,11 +600,6 @@ int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
     dst->dts                  = src->dts;
     dst->pos                  = src->pos;
     dst->duration             = src->duration;
-#if FF_API_CONVERGENCE_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    dst->convergence_duration = src->convergence_duration;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     dst->flags                = src->flags;
     dst->stream_index         = src->stream_index;
 
@@ -742,12 +732,6 @@ void av_packet_rescale_ts(AVPacket *pkt, AVRational src_tb, AVRational dst_tb)
         pkt->dts = av_rescale_q(pkt->dts, src_tb, dst_tb);
     if (pkt->duration > 0)
         pkt->duration = av_rescale_q(pkt->duration, src_tb, dst_tb);
-#if FF_API_CONVERGENCE_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (pkt->convergence_duration > 0)
-        pkt->convergence_duration = av_rescale_q(pkt->convergence_duration, src_tb, dst_tb);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 }
 
 int avpriv_packet_list_put(PacketList **packet_buffer,
index ca18ae631f362476109d931264da80f4d23e4797..47e9b8999b21bc29e52c2bb17467e3a9f297633b 100644 (file)
@@ -387,16 +387,6 @@ typedef struct AVPacket {
     int64_t duration;
 
     int64_t pos;                            ///< byte position in stream, -1 if unknown
-
-#if FF_API_CONVERGENCE_DURATION
-    /**
-     * @deprecated Same as the duration field, but as int64_t. This was required
-     * for Matroska subtitles, whose duration values could overflow when the
-     * duration field was still an int.
-     */
-    attribute_deprecated
-    int64_t convergence_duration;
-#endif
 } AVPacket;
 
 #if FF_API_INIT_PACKET
index 11c41d6a0a0e20a443d91e040261ecfc87d83b01..08b9945a57ef9698042010ae8392f9dc5d786cc0 100644 (file)
@@ -67,11 +67,6 @@ found:
             goto err_out;
     }
     s->key_frame            = -1;
-#if FF_API_CONVERGENCE_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    s->convergence_duration = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     s->dts_sync_point       = INT_MIN;
     s->dts_ref_dts_delta    = INT_MIN;
     s->pts_dts_delta        = INT_MIN;
index a6b6ffc799d4097d60c6ec35fd95e6144dc907a4..d4a48b026b3a8fc5e217e73089bd292c2b9d3c2f 100644 (file)
@@ -57,9 +57,6 @@
 #ifndef FF_API_VDPAU_PROFILE
 #define FF_API_VDPAU_PROFILE     (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
-#ifndef FF_API_CONVERGENCE_DURATION
-#define FF_API_CONVERGENCE_DURATION (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
 #ifndef FF_API_AVPICTURE
 #define FF_API_AVPICTURE         (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
index e8c76f9cfbae8440784b7045070cff925df15b82..116e331215289f1b2654bfb8cb21db457e1213e5 100644 (file)
@@ -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);
index 0141fb0b8dd48bc1ee6507b8c3e79e17122ee180..b36e86ecb1d67d6c92f68fe54c36f12cc0a6c830 100644 (file)
@@ -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);
index 484dd4d230c688ccd2cca88ca4d8256b68fa3e68..9bb0ff94c168018c7f66709a09572a9205ad3d7f 100644 (file)
@@ -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);
index 02768aca1f0a84f84b4eb277a8472c4240bbe1d6..322ccd3af27913ddeb044424dfdc74ec6a735f06 100644 (file)
@@ -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
 }
 
 /**