mirror of https://git.ffmpeg.org/ffmpeg.git
fftools/ffmpeg_demux: move InputStream.streamcopy_needed to private data
It is no longer used outside of ffmpeg_demux.
This commit is contained in:
parent
7df3253c5a
commit
6b0c984f0d
|
@ -343,7 +343,6 @@ typedef struct InputStream {
|
||||||
int discard; /* true if stream data should be discarded */
|
int discard; /* true if stream data should be discarded */
|
||||||
int user_set_discard;
|
int user_set_discard;
|
||||||
int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */
|
int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */
|
||||||
int streamcopy_needed;
|
|
||||||
#define DECODING_FOR_OST 1
|
#define DECODING_FOR_OST 1
|
||||||
#define DECODING_FOR_FILTER 2
|
#define DECODING_FOR_FILTER 2
|
||||||
// should attach FrameData as opaque_ref after decoding
|
// should attach FrameData as opaque_ref after decoding
|
||||||
|
|
|
@ -60,6 +60,8 @@ typedef struct DemuxStream {
|
||||||
|
|
||||||
double ts_scale;
|
double ts_scale;
|
||||||
|
|
||||||
|
int streamcopy_needed;
|
||||||
|
|
||||||
int wrap_correction_done;
|
int wrap_correction_done;
|
||||||
int saw_first_ts;
|
int saw_first_ts;
|
||||||
///< dts of the first packet read for this stream (in AV_TIME_BASE units)
|
///< dts of the first packet read for this stream (in AV_TIME_BASE units)
|
||||||
|
@ -346,7 +348,7 @@ static int ist_dts_update(DemuxStream *ds, AVPacket *pkt)
|
||||||
}
|
}
|
||||||
|
|
||||||
av_assert0(!pkt->opaque_ref);
|
av_assert0(!pkt->opaque_ref);
|
||||||
if (ist->streamcopy_needed) {
|
if (ds->streamcopy_needed) {
|
||||||
DemuxPktData *pd;
|
DemuxPktData *pd;
|
||||||
|
|
||||||
pkt->opaque_ref = av_buffer_allocz(sizeof(*pd));
|
pkt->opaque_ref = av_buffer_allocz(sizeof(*pd));
|
||||||
|
@ -806,10 +808,12 @@ void ifile_close(InputFile **pf)
|
||||||
|
|
||||||
static void ist_use(InputStream *ist, int decoding_needed)
|
static void ist_use(InputStream *ist, int decoding_needed)
|
||||||
{
|
{
|
||||||
|
DemuxStream *ds = ds_from_ist(ist);
|
||||||
|
|
||||||
ist->discard = 0;
|
ist->discard = 0;
|
||||||
ist->st->discard = ist->user_set_discard;
|
ist->st->discard = ist->user_set_discard;
|
||||||
ist->decoding_needed |= decoding_needed;
|
ist->decoding_needed |= decoding_needed;
|
||||||
ist->streamcopy_needed |= !decoding_needed;
|
ds->streamcopy_needed |= !decoding_needed;
|
||||||
|
|
||||||
if (decoding_needed && !avcodec_is_open(ist->dec_ctx)) {
|
if (decoding_needed && !avcodec_is_open(ist->dec_ctx)) {
|
||||||
int ret = dec_open(ist);
|
int ret = dec_open(ist);
|
||||||
|
|
Loading…
Reference in New Issue