comparison matroskaenc.c @ 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
comparison
equal deleted inserted replaced
5793:640f14283092 5794:31e8a43123c5
864 int keyframe = !!(pkt->flags & PKT_FLAG_KEY); 864 int keyframe = !!(pkt->flags & PKT_FLAG_KEY);
865 int duration = pkt->duration; 865 int duration = pkt->duration;
866 int ret; 866 int ret;
867 int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts; 867 int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts;
868 868
869 if (ts == AV_NOPTS_VALUE) {
870 av_log(s, AV_LOG_ERROR, "Can't write packet with unknown timestamp\n");
871 return AVERROR(EINVAL);
872 }
873
869 if (url_is_streamed(s->pb)) { 874 if (url_is_streamed(s->pb)) {
870 if (!mkv->dyn_bc) 875 if (!mkv->dyn_bc)
871 url_open_dyn_buf(&mkv->dyn_bc); 876 url_open_dyn_buf(&mkv->dyn_bc);
872 pb = mkv->dyn_bc; 877 pb = mkv->dyn_bc;
873 } 878 }