From ea4dd7e0d5b85a78af57af5484d3760c507898f0 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 31 Jan 2020 22:46:41 +0000 Subject: ffmpeg: refactoring git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9220 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/ffmpeg/decoder_ffmpeg.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'src/plugins/Input/ffmpeg/decoder_ffmpeg.h') diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h index a5748e394..5bea3901d 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2019 by Ilya Kotov * + * Copyright (C) 2006-2020 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -50,24 +50,23 @@ private: //helper functions void fillBuffer(); - AVFormatContext *ic; - AVCodecContext *c; - - int m_bitrate, audioIndex; + AVFormatContext *m_formatContext = nullptr; + AVCodecContext *m_codecContext = nullptr; + AVIOContext *m_stream = nullptr; + AVFrame *m_frame = nullptr; + int m_bitrate = 0, m_audioIndex = 0; QString m_path; - qint64 m_totalTime; - AVPacket m_pkt; - AVPacket m_temp_pkt; - qint64 m_output_at; - uchar *m_input_buf; - int64_t m_seekTime; - qint64 m_skipBytes; - int m_channels; + qint64 m_totalTime = 0; + AVPacket *m_pkt = nullptr; + qint64 m_output_size = 0; + uchar *m_input_buf = nullptr; + int64_t m_seekTime = -1; + qint64 m_skipBytes = 0; + int m_channels = 0; + bool m_eof = false; + - qint64 ffmpeg_decode(); - AVIOContext *m_stream; - AVFrame *m_decoded_frame; }; -- cgit v1.2.3-13-gbd6f