ffmpegdecoder: read pixel format from frame instead of stream
This commit is contained in:
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
virtual FootageDescription Probe(const QString &filename, const QAtomicInt *cancelled) const override;
|
||||
|
||||
virtual VideoParams GetParamsForTexture(const Decoder::RetrieveVideoParams &p) const override;
|
||||
virtual VideoParams GetParamsForTexture(const Decoder::RetrieveVideoParams &p) override;
|
||||
|
||||
protected:
|
||||
virtual bool OpenInternal() override;
|
||||
@@ -134,7 +134,7 @@ private:
|
||||
*/
|
||||
static QString FFmpegError(int error_code);
|
||||
|
||||
bool InitScaler(const RetrieveVideoParams ¶ms);
|
||||
bool InitScaler(AVFrame *input, const RetrieveVideoParams ¶ms);
|
||||
void FreeScaler();
|
||||
|
||||
static VideoParams::Format GetNativePixelFormat(AVPixelFormat pix_fmt);
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
AVFilterGraph* filter_graph_;
|
||||
AVFilterContext* buffersrc_ctx_;
|
||||
AVFilterContext* buffersink_ctx_;
|
||||
AVPixelFormat ideal_pix_fmt_;
|
||||
AVPixelFormat input_fmt_;
|
||||
VideoParams::Format native_pix_fmt_;
|
||||
int native_channel_count_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user