avformat/hlsenc: correct log text and supply packet details
This commit is contained in:
		
							parent
							
								
									4fda451c9f
								
							
						
					
					
						commit
						8ab2bb81b2
					
				@ -2471,7 +2471,8 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
 | 
			
		||||
            if (pkt->duration) {
 | 
			
		||||
                vs->duration += (double)(pkt->duration) * st->time_base.num / st->time_base.den;
 | 
			
		||||
            } else {
 | 
			
		||||
                av_log(s, AV_LOG_WARNING, "pkt->duration = 0, maybe the hls segment duration will not precise\n");
 | 
			
		||||
                av_log(s, AV_LOG_WARNING, "Stream %d packet with pts %" PRId64 " has duration 0. The segment duration may not be precise.\n",
 | 
			
		||||
                       pkt->stream_index, pkt->pts);
 | 
			
		||||
                vs->duration = (double)(pkt->pts - vs->end_pts) * st->time_base.num / st->time_base.den;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user