Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'
[ffmpeg.git] / libavformat / srtenc.c
index 9bb83d6..0b2a16b 100644 (file)
@@ -73,9 +73,13 @@ 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);