projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84d4e59
)
mkvenc: Don't try to write packets with unknown timestamps
author
David Conrad
<lessen42@gmail.com>
Tue, 9 Mar 2010 04:23:33 +0000
(
04:23
+0000)
committer
David Conrad
<lessen42@gmail.com>
Tue, 9 Mar 2010 04:23:33 +0000
(
04:23
+0000)
Originally committed as revision 22371 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/matroskaenc.c
patch
|
blob
|
history
diff --git
a/libavformat/matroskaenc.c
b/libavformat/matroskaenc.c
index
1ed69b4
..
c0d4f1b
100644
(file)
--- a/
libavformat/matroskaenc.c
+++ b/
libavformat/matroskaenc.c
@@
-866,6
+866,11
@@
static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
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);