From a3a0230a9870b9018dc7415ae5872784d524cfe5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 27 May 2016 12:14:33 +0200 Subject: avconv: init filtergraphs only after we have a frame on each input This makes sure the actual stream parameters are used, which is important mainly for hardware decoding+filtering cases, which would previously require various weird workarounds to handle the fact that a fake software graph has to be constructed, but never used. This should also improve behaviour in rare cases where avformat_find_stream_info() does not provide accurate information. --- avconv.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'avconv.h') diff --git a/avconv.h b/avconv.h index cb089e41f1..5d365a00ee 100644 --- a/avconv.h +++ b/avconv.h @@ -200,6 +200,8 @@ typedef struct InputFilter { struct FilterGraph *graph; uint8_t *name; + AVFifoBuffer *frame_queue; + // parameters configured for this input int format; @@ -272,14 +274,6 @@ typedef struct InputStream { AVRational framerate; /* framerate forced with -r */ int autorotate; - int resample_height; - int resample_width; - int resample_pix_fmt; - - int resample_sample_fmt; - int resample_sample_rate; - int resample_channels; - uint64_t resample_channel_layout; /* decoded data from this stream goes into all those filters * currently video and audio only */ @@ -494,7 +488,6 @@ int init_simple_filtergraph(InputStream *ist, OutputStream *ost); int init_complex_filtergraph(FilterGraph *fg); int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame); -int ifilter_parameters_from_decoder(InputFilter *ifilter, const AVCodecContext *avctx); int avconv_parse_options(int argc, char **argv); -- cgit v1.2.3