From 1f005df2f3ff78458f332f9bf1cf2e78b6a8e8e4 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期四, 26 九月 2019 14:43:52 +0800 Subject: [PATCH] bug fix audio codec --- csrc/ffmpeg/format/FormatIn.hpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/csrc/ffmpeg/format/FormatIn.hpp b/csrc/ffmpeg/format/FormatIn.hpp index 5514bc6..4eb7847 100644 --- a/csrc/ffmpeg/format/FormatIn.hpp +++ b/csrc/ffmpeg/format/FormatIn.hpp @@ -3,6 +3,7 @@ #include <stdint.h> #include <memory> +#include <vector> #include "PsToEs.hpp" struct AVFormatContext; @@ -41,10 +42,12 @@ bool isVideoPkt(AVPacket *pkt); bool isAudioPkt(AVPacket *pkt); + bool notVideoAudio(AVPacket *pkt); private: bool allocCodec(AVCodec *dec, AVStream *s, AVDictionary **options); public: AVStream *getStream(int type = -1); + std::vector<AVStream*> allStreams(); AVCodecContext *getCodecContext(int type = 0); AVFormatContext *getFromatContext(){return ctx_;} const double getFPS()const{return fps_;} -- Gitblit v1.8.0