Mercurial > libavformat.hg
changeset 5794:31e8a43123c5 libavformat
mkvenc: Don't try to write packets with unknown timestamps
author | conrad |
---|---|
date | Tue, 09 Mar 2010 04:23:33 +0000 |
parents | 640f14283092 |
children | 67059af53c04 |
files | matroskaenc.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskaenc.c Tue Mar 09 04:23:28 2010 +0000 +++ b/matroskaenc.c Tue Mar 09 04:23:33 2010 +0000 @@ -866,6 +866,11 @@ int ret; int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts; + if (ts == AV_NOPTS_VALUE) { + av_log(s, AV_LOG_ERROR, "Can't write packet with unknown timestamp\n"); + return AVERROR(EINVAL); + } + if (url_is_streamed(s->pb)) { if (!mkv->dyn_bc) url_open_dyn_buf(&mkv->dyn_bc);