diff mbox series

[FFmpeg-devel,4/4] fftools/ffmpeg_demux, sync_queue: Constify a bit

Message ID AS8P250MB0744F6A418C229F84C1A06208F582@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 6c693da690d2618b36c801f0b10607a4f68eaad6
Headers show
Series [FFmpeg-devel,1/4] avformat/avio: Make avio_print_string_array() accept const pointers | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 28, 2024, 7:07 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 fftools/ffmpeg_demux.c | 2 +-
 fftools/sync_queue.c   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index d5a3dbc1d2..29f4a26224 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -161,7 +161,7 @@  InputStream *ist_find_unused(enum AVMediaType type)
 
 static void report_new_stream(Demuxer *d, const AVPacket *pkt)
 {
-    AVStream *st = d->f.ctx->streams[pkt->stream_index];
+    const AVStream *st = d->f.ctx->streams[pkt->stream_index];
 
     if (pkt->stream_index < d->nb_streams_warn)
         return;
diff --git a/fftools/sync_queue.c b/fftools/sync_queue.c
index bc107ba4fe..0e35b5b1cb 100644
--- a/fftools/sync_queue.c
+++ b/fftools/sync_queue.c
@@ -319,7 +319,7 @@  static int overflow_heartbeat(SyncQueue *sq, int stream_idx)
     /* signal a fake timestamp for all streams that prevent tail_ts from being output */
     tail_ts++;
     for (unsigned int i = 0; i < sq->nb_streams; i++) {
-        SyncQueueStream *st1 = &sq->streams[i];
+        const SyncQueueStream *st1 = &sq->streams[i];
         int64_t ts;
 
         if (st == st1 || st1->finished ||
@@ -524,8 +524,8 @@  fail:
 static int receive_for_stream(SyncQueue *sq, unsigned int stream_idx,
                               SyncQueueFrame frame)
 {
-    SyncQueueStream *st_head = sq->head_stream >= 0 ?
-                               &sq->streams[sq->head_stream] : NULL;
+    const SyncQueueStream *st_head = sq->head_stream >= 0 ?
+                                     &sq->streams[sq->head_stream] : NULL;
     SyncQueueStream *st;
 
     av_assert0(stream_idx < sq->nb_streams);