From 7375d539f8cec2d21f96ca2c4d3841f04d20161f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 22 Dec 2007 09:36:31 +0000 Subject: [PATCH] Revision 3538 introduced a bug causing all video timecodes for non-AVC tracks to be 0 because the default_duration was not set. This is hopefully a fix for bug 267. --- src/input/r_ogm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/r_ogm.cpp b/src/input/r_ogm.cpp index 3a42f72be..0229f7277 100644 --- a/src/input/r_ogm.cpp +++ b/src/input/r_ogm.cpp @@ -449,6 +449,8 @@ ogm_reader_c::create_packetizer(int64_t tid) { width = get_uint32_le(&sth->sh.video.width); height = get_uint32_le(&sth->sh.video.height); + dmx->default_duration = 100 * get_uint64_le(&sth->time_unit); + if (mpeg4::p2::is_fourcc(sth->subtype)) { ptzr = new mpeg4_p2_video_packetizer_c(this, fps, width, height, false, ti); @@ -459,7 +461,6 @@ ogm_reader_c::create_packetizer(int64_t tid) { try { ti.private_data = NULL; ti.private_size = 0; - dmx->default_duration = 100 * get_uint64_le(&sth->time_unit); memory_cptr avcc = extract_avcc(dmx, tid); mpeg4_p10_es_video_packetizer_c *vptzr = new mpeg4_p10_es_video_packetizer_c(this, avcc, width, height, ti);