diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-12-13 19:15:11 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-12-14 20:16:53 +0100 |
commit | 882bc8049dea90bf8c9091c02b06c2309892111e (patch) | |
tree | badff1bc8fcb283a8f760748207d825993169593 | |
parent | 9afe3f527449ddef68ae526e52e2480eaa57cd3a (diff) | |
download | ffmpeg-882bc8049dea90bf8c9091c02b06c2309892111e.tar.gz |
fftools/ffmpeg: move InputStream.codec_desc to private data
It is not used outside of ffmpeg_demux.
-rw-r--r-- | fftools/ffmpeg.h | 1 | ||||
-rw-r--r-- | fftools/ffmpeg_demux.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 4f7a386d41..b10a2f2c0d 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -358,7 +358,6 @@ typedef struct InputStream { Decoder *decoder; AVCodecContext *dec_ctx; const AVCodec *dec; - const AVCodecDescriptor *codec_desc; AVRational framerate_guessed; diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 03c8bb44e6..87f84fdccf 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -83,6 +83,8 @@ typedef struct DemuxStream { ///< dts of the last packet read for this stream (in AV_TIME_BASE units) int64_t dts; + const AVCodecDescriptor *codec_desc; + /* number of packets successfully read for this stream */ uint64_t nb_packets; // combined size of all the packets read @@ -320,8 +322,8 @@ static int ist_dts_update(DemuxStream *ds, AVPacket *pkt, FrameData *fd) (AVRational){ 2, 1 }); int fields = 2; - if (ist->codec_desc && - (ist->codec_desc->props & AV_CODEC_PROP_FIELDS) && + if (ds->codec_desc && + (ds->codec_desc->props & AV_CODEC_PROP_FIELDS) && av_stream_get_parser(ist->st)) fields = 1 + av_stream_get_parser(ist->st)->repeat_pict; @@ -1249,7 +1251,7 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st) return ret; } - ist->codec_desc = avcodec_descriptor_get(ist->par->codec_id); + ds->codec_desc = avcodec_descriptor_get(ist->par->codec_id); return 0; } |