diff mbox series

[FFmpeg-devel,1/3] avformat/utils: make ff_update_cur_dts() an avpriv function

Message ID 20210605150149.2334-1-jamrial@gmail.com
State Accepted
Commit c768233293a8ae43907d6dc3a7075a750dc12280
Headers show
Series [FFmpeg-devel,1/3] avformat/utils: make ff_update_cur_dts() an avpriv function | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

James Almer June 5, 2021, 3:01 p.m. UTC
libavdevice needs it.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/aadec.c       | 4 ++--
 libavformat/brstm.c       | 2 +-
 libavformat/idcin.c       | 2 +-
 libavformat/internal.h    | 2 +-
 libavformat/matroskadec.c | 2 +-
 libavformat/mca.c         | 2 +-
 libavformat/mp3dec.c      | 2 +-
 libavformat/mpc8.c        | 2 +-
 libavformat/mxfdec.c      | 4 ++--
 libavformat/utils.c       | 8 ++++----
 libavformat/vpk.c         | 2 +-
 11 files changed, 16 insertions(+), 16 deletions(-)

Comments

James Almer June 9, 2021, 1:20 p.m. UTC | #1
On 6/5/2021 12:01 PM, James Almer wrote:
> libavdevice needs it.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>   libavformat/aadec.c       | 4 ++--
>   libavformat/brstm.c       | 2 +-
>   libavformat/idcin.c       | 2 +-
>   libavformat/internal.h    | 2 +-
>   libavformat/matroskadec.c | 2 +-
>   libavformat/mca.c         | 2 +-
>   libavformat/mp3dec.c      | 2 +-
>   libavformat/mpc8.c        | 2 +-
>   libavformat/mxfdec.c      | 4 ++--
>   libavformat/utils.c       | 8 ++++----
>   libavformat/vpk.c         | 2 +-
>   11 files changed, 16 insertions(+), 16 deletions(-)

Will apply set.
diff mbox series

Patch

diff --git a/libavformat/aadec.c b/libavformat/aadec.c
index 9fe24d5d53..70df0439bd 100644
--- a/libavformat/aadec.c
+++ b/libavformat/aadec.c
@@ -238,7 +238,7 @@  static int aa_read_header(AVFormatContext *s)
 
     st->duration = (largest_size - CHAPTER_HEADER_SIZE * s->nb_chapters) * TIMEPREC;
 
-    ff_update_cur_dts(s, st, 0);
+    avpriv_update_cur_dts(s, st, 0);
     avio_seek(pb, start, SEEK_SET);
     c->current_chapter_size = 0;
     c->seek_offset = 0;
@@ -365,7 +365,7 @@  static int aa_read_seek(AVFormatContext *s,
         c->seek_offset = (MP3_FRAME_SIZE - chapter_pos % MP3_FRAME_SIZE) % MP3_FRAME_SIZE;
     }
 
-    ff_update_cur_dts(s, s->streams[0], ch->start + (chapter_pos + c->seek_offset) * TIMEPREC);
+    avpriv_update_cur_dts(s, s->streams[0], ch->start + (chapter_pos + c->seek_offset) * TIMEPREC);
 
     return 1;
 }
diff --git a/libavformat/brstm.c b/libavformat/brstm.c
index f1f0f86ed5..601f73dd33 100644
--- a/libavformat/brstm.c
+++ b/libavformat/brstm.c
@@ -477,7 +477,7 @@  static int read_seek(AVFormatContext *s, int stream_index,
         return ret;
 
     b->current_block = timestamp;
-    ff_update_cur_dts(s, st, timestamp * b->samples_per_block);
+    avpriv_update_cur_dts(s, st, timestamp * b->samples_per_block);
     return 0;
 }
 
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index 0c38d880f4..b7402107da 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -358,7 +358,7 @@  static int idcin_read_seek(AVFormatContext *s, int stream_index,
         int64_t ret = avio_seek(s->pb, idcin->first_pkt_pos, SEEK_SET);
         if (ret < 0)
             return ret;
-        ff_update_cur_dts(s, s->streams[idcin->video_stream_index], 0);
+        avpriv_update_cur_dts(s, s->streams[idcin->video_stream_index], 0);
         idcin->next_chunk_is_video = 1;
         idcin->current_audio_chunk = 0;
         return 0;
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 970fccf6c2..9882454d59 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -635,7 +635,7 @@  int ff_seek_frame_binary(AVFormatContext *s, int stream_index,
  * @param timestamp new dts expressed in time_base of param ref_st
  * @param ref_st reference stream giving time_base of param timestamp
  */
-void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp);
+void avpriv_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp);
 
 int ff_find_last_ts(AVFormatContext *s, int stream_index, int64_t *ts, int64_t *pos,
                     int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t ));
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 73e1ddb68d..356a02339c 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3859,7 +3859,7 @@  static int matroska_read_seek(AVFormatContext *s, int stream_index,
     }
     matroska->skip_to_keyframe = 1;
     matroska->done             = 0;
-    ff_update_cur_dts(s, st, st->internal->index_entries[index].timestamp);
+    avpriv_update_cur_dts(s, st, st->internal->index_entries[index].timestamp);
     return 0;
 err:
     // slightly hackish but allows proper fallback to
diff --git a/libavformat/mca.c b/libavformat/mca.c
index 0fd5ce8aaf..ca0f76d6bf 100644
--- a/libavformat/mca.c
+++ b/libavformat/mca.c
@@ -213,7 +213,7 @@  static int read_seek(AVFormatContext *s, int stream_index,
         return ret;
 
     m->current_block = timestamp;
-    ff_update_cur_dts(s, st, timestamp * m->samples_per_block);
+    avpriv_update_cur_dts(s, st, timestamp * m->samples_per_block);
     return 0;
 }
 
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index b12cd31148..c6949e6095 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -589,7 +589,7 @@  static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
         ie1.timestamp = frame_duration * av_rescale(best_pos - s->internal->data_offset, mp3->frames, mp3->header_filesize);
     }
 
-    ff_update_cur_dts(s, st, ie->timestamp);
+    avpriv_update_cur_dts(s, st, ie->timestamp);
     return 0;
 }
 
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index ff6f43231c..5498ce940d 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -320,7 +320,7 @@  static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestam
     if(index < 0) return -1;
     if (avio_seek(s->pb, st->internal->index_entries[index].pos, SEEK_SET) < 0)
         return -1;
-    ff_update_cur_dts(s, st, st->internal->index_entries[index].timestamp);
+    avpriv_update_cur_dts(s, st, st->internal->index_entries[index].timestamp);
     return 0;
 }
 
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 3bf480a3a6..e489e59e5d 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3815,7 +3815,7 @@  static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
         if (seekpos < 0)
             return seekpos;
 
-        ff_update_cur_dts(s, st, sample_time);
+        avpriv_update_cur_dts(s, st, sample_time);
         mxf->current_klv_data = (KLVPacket){{0}};
     } else {
         MXFPartition *partition;
@@ -3868,7 +3868,7 @@  static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
         if ((ret = mxf_edit_unit_absolute_offset(mxf, t, sample_time, source_track->edit_rate, &sample_time, &seekpos, &partition, 1)) < 0)
             return ret;
 
-        ff_update_cur_dts(s, st, sample_time);
+        avpriv_update_cur_dts(s, st, sample_time);
         if (source_track->wrapping == ClipWrapped) {
             KLVPacket klv = partition->first_essence_klv;
             if (seekpos < klv.next_klv - klv.length || seekpos >= klv.next_klv) {
diff --git a/libavformat/utils.c b/libavformat/utils.c
index fe8eaa6cb3..13c0ade5ba 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1848,7 +1848,7 @@  void ff_read_frame_flush(AVFormatContext *s)
     }
 }
 
-void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
+void avpriv_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
 {
     int i;
 
@@ -2156,7 +2156,7 @@  int ff_seek_frame_binary(AVFormatContext *s, int stream_index,
         return ret;
 
     ff_read_frame_flush(s);
-    ff_update_cur_dts(s, st, ts);
+    avpriv_update_cur_dts(s, st, ts);
 
     return 0;
 }
@@ -2350,7 +2350,7 @@  static int seek_frame_generic(AVFormatContext *s, int stream_index,
             ie = &st->internal->index_entries[st->internal->nb_index_entries - 1];
             if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0)
                 return ret;
-            ff_update_cur_dts(s, st, ie->timestamp);
+            avpriv_update_cur_dts(s, st, ie->timestamp);
         } else {
             if ((ret = avio_seek(s->pb, s->internal->data_offset, SEEK_SET)) < 0)
                 return ret;
@@ -2388,7 +2388,7 @@  static int seek_frame_generic(AVFormatContext *s, int stream_index,
     ie = &st->internal->index_entries[index];
     if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0)
         return ret;
-    ff_update_cur_dts(s, st, ie->timestamp);
+    avpriv_update_cur_dts(s, st, ie->timestamp);
 
     return 0;
 }
diff --git a/libavformat/vpk.c b/libavformat/vpk.c
index 9eb3eb5362..d542a0806d 100644
--- a/libavformat/vpk.c
+++ b/libavformat/vpk.c
@@ -130,7 +130,7 @@  static int vpk_read_seek(AVFormatContext *s, int stream_index,
         return ret;
 
     vpk->current_block = timestamp;
-    ff_update_cur_dts(s, st, timestamp * samples_per_block);
+    avpriv_update_cur_dts(s, st, timestamp * samples_per_block);
     return 0;
 }