Browse Source

avutil: remove deprecated FF_API_PKT_DURATION

Signed-off-by: James Almer <jamrial@gmail.com>
James Almer 1 year ago
parent
commit
b8fef7e9c5

+ 0 - 2
doc/ffprobe.xsd

@@ -105,8 +105,6 @@
     <xsd:attribute name="pkt_dts_time"  type="xsd:float"/>
     <xsd:attribute name="best_effort_timestamp"      type="xsd:long" />
     <xsd:attribute name="best_effort_timestamp_time" type="xsd:float" />
-    <xsd:attribute name="pkt_duration"  type="xsd:long" />
-    <xsd:attribute name="pkt_duration_time" type="xsd:float"/>
     <xsd:attribute name="duration"      type="xsd:long" />
     <xsd:attribute name="duration_time" type="xsd:float"/>
     <xsd:attribute name="pkt_pos"       type="xsd:long" />

+ 0 - 5
fftools/ffmpeg_filter.c

@@ -2666,11 +2666,6 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt,
     frame->pts       = av_rescale_q(frame->pts,      frame->time_base, ifp->time_base);
     frame->duration  = av_rescale_q(frame->duration, frame->time_base, ifp->time_base);
     frame->time_base = ifp->time_base;
-#if LIBAVUTIL_VERSION_MAJOR < 59
-    AV_NOWARN_DEPRECATED(
-    frame->pkt_duration = frame->duration;
-    )
-#endif
 
     fd = frame_data(frame);
     if (!fd)

+ 0 - 6
fftools/ffprobe.c

@@ -2778,12 +2778,6 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
     print_time("pkt_dts_time",          frame->pkt_dts, &stream->time_base);
     print_ts  ("best_effort_timestamp", frame->best_effort_timestamp);
     print_time("best_effort_timestamp_time", frame->best_effort_timestamp, &stream->time_base);
-#if LIBAVUTIL_VERSION_MAJOR < 59
-    AV_NOWARN_DEPRECATED(
-    print_duration_ts  ("pkt_duration",      frame->pkt_duration);
-    print_duration_time("pkt_duration_time", frame->pkt_duration, &stream->time_base);
-    )
-#endif
     print_duration_ts  ("duration",          frame->duration);
     print_duration_time("duration_time",     frame->duration, &stream->time_base);
     if (fd && fd->pkt_pos != -1)  print_fmt    ("pkt_pos", "%"PRId64, fd->pkt_pos);

+ 0 - 6
libavcodec/decode.c

@@ -634,12 +634,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
                                                          frame->pts,
                                                          frame->pkt_dts);
 
-#if FF_API_PKT_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->pkt_duration = frame->duration;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         /* the only case where decode data is not set should be decoders
          * that do not call ff_get_buffer() */
         av_assert0((frame->private_ref && frame->private_ref->size == sizeof(FrameDecodeData)) ||

+ 0 - 7
libavdevice/alsa_enc.c

@@ -132,13 +132,6 @@ static int audio_write_frame(AVFormatContext *s1, int stream_index,
     pkt.data     = (*frame)->data[0];
     pkt.size     = (*frame)->nb_samples * s->frame_size;
     pkt.dts      = (*frame)->pkt_dts;
-#if FF_API_PKT_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    if ((*frame)->pkt_duration)
-        pkt.duration = (*frame)->pkt_duration;
-    else
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     pkt.duration = (*frame)->duration;
     return audio_write_packet(s1, &pkt);
 }

+ 0 - 7
libavdevice/pulse_audio_enc.c

@@ -687,13 +687,6 @@ static int pulse_write_frame(AVFormatContext *h, int stream_index,
     pkt.data     = (*frame)->data[0];
     pkt.size     = (*frame)->nb_samples * av_get_bytes_per_sample((*frame)->format) * (*frame)->ch_layout.nb_channels;
     pkt.dts      = (*frame)->pkt_dts;
-#if FF_API_PKT_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    if ((*frame)->pkt_duration)
-        pkt.duration = (*frame)->pkt_duration;
-    else
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     pkt.duration = (*frame)->duration;
     return pulse_write_packet(h, &pkt);
 }

+ 0 - 5
libavfilter/avfilter.c

@@ -1039,11 +1039,6 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
 
         frame->duration = av_rescale_q(frame->nb_samples, (AVRational){ 1, frame->sample_rate },
                                        link->time_base);
-#if FF_API_PKT_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->pkt_duration = frame->duration;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     li->frame_blocked_in = link->frame_wanted_out = 0;

+ 0 - 7
libavfilter/buffersrc.c

@@ -241,13 +241,6 @@ int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFra
             return AVERROR(ENOMEM);
     }
 
-#if FF_API_PKT_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (copy->pkt_duration && copy->pkt_duration != copy->duration)
-        copy->duration = copy->pkt_duration;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 #if FF_API_INTERLACED_FRAME
 FF_DISABLE_DEPRECATION_WARNINGS
     if (copy->interlaced_frame)

+ 0 - 7
libavfilter/vf_deshake_opencl.c

@@ -1412,13 +1412,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *input_frame)
             &debug_matches, 1);
     }
 
-#if FF_API_PKT_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (input_frame->pkt_duration) {
-        duration = input_frame->pkt_duration;
-    } else
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     if (input_frame->duration) {
         duration = input_frame->duration;
     } else {

+ 0 - 15
libavfilter/vf_drawtext.c

@@ -104,9 +104,6 @@ static const char *const var_names[] = {
 #if FF_API_FRAME_PKT
     "pkt_pos",
 #endif
-#if FF_API_PKT_DURATION
-    "pkt_duration",
-#endif
 #if FF_API_FRAME_PKT
     "pkt_size",
 #endif
@@ -155,9 +152,6 @@ enum var_name {
 #if FF_API_FRAME_PKT
     VAR_PKT_POS,
 #endif
-#if FF_API_PKT_DURATION
-    VAR_PKT_DURATION,
-#endif
 #if FF_API_FRAME_PKT
     VAR_PKT_SIZE,
 #endif
@@ -1877,15 +1871,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
     s->var_values[VAR_PKT_POS] = frame->pkt_pos;
     s->var_values[VAR_PKT_SIZE] = frame->pkt_size;
 FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-#if FF_API_PKT_DURATION
-FF_DISABLE_DEPRECATION_WARNINGS
-    s->var_values[VAR_PKT_DURATION] = frame->pkt_duration * av_q2d(inlink->time_base);
-
-    if (frame->pkt_duration)
-        s->var_values[VAR_DURATION] = frame->pkt_duration * av_q2d(inlink->time_base);
-    else
-FF_ENABLE_DEPRECATION_WARNINGS
 #endif
     s->var_values[VAR_DURATION] = frame->duration * av_q2d(inlink->time_base);
 

Some files were not shown because too many files changed in this diff