]> git.pld-linux.org Git - packages/kino.git/blame - kino-segfault_empty_chapter.patch
- add segfault_empty_chapter,fix_avi_packing,fix_no_mplex,fix_bigendian_warning patch...
[packages/kino.git] / kino-segfault_empty_chapter.patch
CommitLineData
6afc24d6
ER
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## Paul Brossier <piem@debian.org>
3## DP: fix segfault when dvdauth chapter list empty
4
5@DPATCH@
6--- kino-0.76.orig/src/page_export_mjpeg.cc
7+++ kino-0.76/src/page_export_mjpeg.cc
8@@ -472,8 +472,10 @@
9 {
10 std::string tmpSceneStr;
11 tmpSceneStr = this->common->getTime().parseFramesToString( *sceneIter, SMIL::Time::TIME_FORMAT_SMPTE );
12+ if (tmpSceneStr.length() > 9)
13 chapterList << "," << tmpSceneStr.substr( 1, 7 ) << "." << std::setw( 2 ) << std::setfill( '0' ) <<
14 static_cast< int >( atof( tmpSceneStr.substr( 9, 2 ).c_str() ) / ( isPal ? 25 : 29.97 ) * 100 );
15+ else goto endchapter;
16 }
17
18 /* output the single vob, checking for chapter marks */
19@@ -481,6 +483,8 @@
20 chapterList.str() << "\" pause=\"0\" />" << std::endl;
21 }
22
23+endchapter:
24+
25 xml << "\t\t\t</pgc>" << std::endl;
26 xml << "\t\t</titles>" << std::endl;
27 xml << "\t</titleset>" <<std::endl;
This page took 0.069826 seconds and 4 git commands to generate.