ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Tue Oct 15 22:18:45 2019 +0200| [14d3384cf31a620ff451062f7263942f7fe3a972] | committer: Michael Niedermayer
avformat/flvenc: Check pts for mpeg4/h264 (which need the value) Fixes: Ticket8152 Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14d3384cf31a620ff451062f7263942f7fe3a972 --- libavformat/flvenc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 9d1327575b..872050a74f 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -928,6 +928,12 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) "Packets are not in the proper order with respect to DTS\n"); return AVERROR(EINVAL); } + if (par->codec_id == AV_CODEC_ID_H264 || par->codec_id == AV_CODEC_ID_MPEG4) { + if (pkt->pts == AV_NOPTS_VALUE) { + av_log(s, AV_LOG_ERROR, "Packet is missing PTS\n"); + return AVERROR(EINVAL); + } + } ts = pkt->dts; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".