From 63fce331209d6a430055ae704b0e890535de8e1e Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期二, 25 五月 2021 15:49:38 +0800
Subject: [PATCH] bug fixed

---
 csrc/ffmpeg/format/FormatIn.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/csrc/ffmpeg/format/FormatIn.cpp b/csrc/ffmpeg/format/FormatIn.cpp
index 17f4d2c..89a28fa 100644
--- a/csrc/ffmpeg/format/FormatIn.cpp
+++ b/csrc/ffmpeg/format/FormatIn.cpp
@@ -182,6 +182,8 @@
             	    fps_ = av_q2d(in->avg_frame_rate);
             	}
 				logIt("in stream video fps %f, time_base: %d : %d, size: %dx%d", fps_, in->time_base.num, in->time_base.den, in->codecpar->width, in->codecpar->height);
+
+
 			}
 			if (type == AVMEDIA_TYPE_AUDIO){
 				auto in = ctx_->streams[i];
@@ -200,7 +202,7 @@
 		return ctx_->streams[vs_idx_]->codecpar->codec_id == AV_CODEC_ID_HEVC;
 	}
 
-	const bool FormatIn::isAVC1()const{
+	const bool FormatIn::IsAVC1()const{
 		if (IsHEVC()) return false;
 
 		char p[100] = {0};
@@ -357,7 +359,6 @@
 	int FormatIn::readPacket(AVPacket *pkt_out){
 
 		auto flag = av_read_frame(ctx_, pkt_out);
-		
 		return flag;
 	}
 
@@ -368,7 +369,7 @@
 		av_packet_rescale_ts(pkt, in->time_base, in->codec->time_base);
         int ret = avcodec_send_packet(dec_ctx_, pkt);
         if(ret < 0){
-        	logIt("avcodec_send_packet error : %s", getAVErrorDesc(ret).c_str());
+        	logIt("pkt size %d avcodec_send_packet error : %s", pkt->size, getAVErrorDesc(ret).c_str());
         	return -1;
         }
         while (ret >= 0) {

--
Gitblit v1.8.0