diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-15 22:18:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-09 15:59:38 +0100 |
commit | 14d3384cf31a620ff451062f7263942f7fe3a972 (patch) | |
tree | 46e9856656106d1133d5f0a347daf4fb994a9ca8 | |
parent | 0c3e1b395b47fac44397604b2a3343c4bd92561c (diff) | |
download | ffmpeg-streaming-14d3384cf31a620ff451062f7263942f7fe3a972.zip ffmpeg-streaming-14d3384cf31a620ff451062f7263942f7fe3a972.tar.gz |
avformat/flvenc: Check pts for mpeg4/h264 (which need the value)
Fixes: Ticket8152
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/flvenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 9d13275..872050a 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; |