[FFmpeg-cvslog] fftools/ffmpeg: make InputStream.decoding_needed private to demuxer

Anton Khirnov git at videolan.org
Tue Jan 30 11:08:14 EET 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jan 24 09:01:54 2024 +0100| [01c71b78eb3cf649a517472fc7307304ecc27d40] | committer: Anton Khirnov

fftools/ffmpeg: make InputStream.decoding_needed private to demuxer

It is no longer used outside of ffmpeg_demux.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01c71b78eb3cf649a517472fc7307304ecc27d40
---

 fftools/ffmpeg.h       |  3 ---
 fftools/ffmpeg_demux.c | 13 +++++++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 4881174632..29d8ea4355 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -337,9 +337,6 @@ typedef struct InputStream {
 
     AVStream *st;
     int user_set_discard;
-    int decoding_needed;     /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */
-#define DECODING_FOR_OST    1
-#define DECODING_FOR_FILTER 2
 
     /**
      * Codec parameters - to be used by the decoding/streamcopy code.
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 0ccb05b1d0..61a4a745b4 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -50,6 +50,11 @@ typedef struct DemuxStream {
 
     double ts_scale;
 
+    /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */
+    int decoding_needed;
+#define DECODING_FOR_OST    1
+#define DECODING_FOR_FILTER 2
+
     /* true if stream data should be discarded */
     int discard;
 
@@ -796,7 +801,7 @@ static void demux_final_stats(Demuxer *d)
         av_log(f, AV_LOG_VERBOSE, "%"PRIu64" packets read (%"PRIu64" bytes); ",
                ds->nb_packets, ds->data_size);
 
-        if (ist->decoding_needed) {
+        if (ds->decoding_needed) {
             av_log(f, AV_LOG_VERBOSE,
                    "%"PRIu64" frames decoded; %"PRIu64" decode errors",
                    ist->decoder->frames_decoded, ist->decoder->decode_errors);
@@ -889,7 +894,7 @@ static int ist_use(InputStream *ist, int decoding_needed)
     }
 
     ist->st->discard      = ist->user_set_discard;
-    ist->decoding_needed |= decoding_needed;
+    ds->decoding_needed   |= decoding_needed;
     ds->streamcopy_needed |= !decoding_needed;
 
     if (decoding_needed && ds->sch_idx_dec < 0) {
@@ -910,9 +915,9 @@ static int ist_use(InputStream *ist, int decoding_needed)
             ds->dec_opts.framerate  = ist->st->avg_frame_rate;
 
         if (ist->dec->id == AV_CODEC_ID_DVB_SUBTITLE &&
-           (ist->decoding_needed & DECODING_FOR_OST)) {
+           (ds->decoding_needed & DECODING_FOR_OST)) {
             av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE);
-            if (ist->decoding_needed & DECODING_FOR_FILTER)
+            if (ds->decoding_needed & DECODING_FOR_FILTER)
                 av_log(ist, AV_LOG_WARNING,
                        "Warning using DVB subtitles for filtering and output at the "
                        "same time is not fully supported, also see -compute_edt [0|1]\n");



More information about the ffmpeg-cvslog mailing list