[FFmpeg-trac] #4971(undetermined:closed): ffmpeg can not slice when i use HLS
FFmpeg
trac at avcodec.org
Thu Oct 29 11:04:34 CET 2015
#4971: ffmpeg can not slice when i use HLS
-------------------------------------+-------------------------------------
Reporter: hiccupzhu | Owner:
Type: defect | Status: closed
Priority: normal | Component:
Version: git-master | undetermined
Keywords: | Resolution: invalid
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by hiccupzhu):
I have FIXED this bug, and ffmpeg can work normally.
{{{
diff --git a/ffmpeg.c b/ffmpeg.c
index f91fb7b..22766b3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3864,6 +3864,9 @@ static int process_input(int file_index)
if (pkt.dts != AV_NOPTS_VALUE)
pkt.dts *= ist->ts_scale;
+ if(pkt.pts == AV_NOPTS_VALUE)
+ pkt.pts = ist->next_pts;
+
if ((ist->dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO ||
ist->dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) &&
pkt.dts != AV_NOPTS_VALUE && ist->next_dts == AV_NOPTS_VALUE &&
!copy_ts
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4971#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list