Commit 14d3384c authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/flvenc: Check pts for mpeg4/h264 (which need the value)

Fixes: Ticket8152
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0c3e1b39
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment