summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-01-24 09:01:54 +0100
committerAnton Khirnov <anton@khirnov.net>2024-01-30 09:52:00 +0100
commit01c71b78eb3cf649a517472fc7307304ecc27d40 (patch)
tree387c405d1376c4fad577ba71f4c4cf00ff5ac3ba /fftools
parent0d00e2e2f7fc39152eca85c8c3e3eea95ad79fd7 (diff)
fftools/ffmpeg: make InputStream.decoding_needed private to demuxer
It is no longer used outside of ffmpeg_demux.
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.h3
-rw-r--r--fftools/ffmpeg_demux.c13
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");