summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-07-02 11:29:48 +0000
committerRodeo <[email protected]>2012-07-02 11:29:48 +0000
commit582656e5b89b32324a4650799eabe47cf233d902 (patch)
tree6be73a341868eadb92c57b8e104157834bfb14b9
parentdac70e917057e83b2a5ae7af1c767515fe27775f (diff)
Fix comparison (check if unsigned type is < 0). Not sure why I keep doing this.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4804 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/muxmkv.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c
index 064dbb145..303d98878 100644
--- a/libhb/muxmkv.c
+++ b/libhb/muxmkv.c
@@ -497,19 +497,23 @@ static int MKVMux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
{
if( mk_startFrame(m->file, mux_data->track) < 0)
{
- hb_error( "Failed to write frame to output file, Disk Full?" );
+ hb_error("Failed to write frame to output file, Disk Full?");
*job->die = 1;
}
uint64_t duration;
timecode = buf->s.start * TIMECODE_SCALE;
- duration = buf->s.stop * TIMECODE_SCALE - timecode;
- // PGS subtitles have negative durations (buf->s.start - 0)
- if (duration < 0)
+ if (buf->s.stop <= buf->s.start)
+ {
duration = 0;
+ }
+ else
+ {
+ duration = buf->s.stop * TIMECODE_SCALE - timecode;
+ }
mk_addFrameData(m->file, mux_data->track, buf->data, buf->size);
mk_setFrameFlags(m->file, mux_data->track, timecode, 1, duration);
mk_flushFrame(m->file, mux_data->track);
- hb_buffer_close( &buf );
+ hb_buffer_close(&buf);
return 0;
}
else