summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Hurlbut <ghurlbut@mythtv.org>2011-02-18 02:42:15 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2011-02-23 08:49:56 (GMT)
commit0234965c20b1d0fd8243ed395e3e6229e790d672 (patch)
tree00abeb65178059729602b7716b8c0943dd037adc
parentffd529f1b671f4dce0f1f40350d365f0ce7644fe (diff)
Make MPEG2fixup::ProcessVideo return int
I'm not 100% sure what the original author was trying to do here, but this code is broken. Returning 0, 1, -1 for a bool makes no sense, and comparing bool < 0 makes even less sense. Rather than trying to unravel what he was trying to do, let's make this a simple int return so the return codes should have some effect. Fixes #9549
-rw-r--r--mythtv/programs/mythtranscode/mpeg2fix.cpp2
-rw-r--r--mythtv/programs/mythtranscode/mpeg2fix.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/mythtv/programs/mythtranscode/mpeg2fix.cpp b/mythtv/programs/mythtranscode/mpeg2fix.cpp
index 8bb8767..255291f 100644
--- a/mythtv/programs/mythtranscode/mpeg2fix.cpp
+++ b/mythtv/programs/mythtranscode/mpeg2fix.cpp
@@ -822,7 +822,7 @@ void MPEG2fixup::AddSequence(MPEG2frame *frame1, MPEG2frame *frame2)
}
}
-bool MPEG2fixup::ProcessVideo(MPEG2frame *vf, mpeg2dec_t *dec)
+int MPEG2fixup::ProcessVideo(MPEG2frame *vf, mpeg2dec_t *dec)
{
int state = -1;
int last_pos = 0;
diff --git a/mythtv/programs/mythtranscode/mpeg2fix.h b/mythtv/programs/mythtranscode/mpeg2fix.h
index 73260c3..44c703e 100644
--- a/mythtv/programs/mythtranscode/mpeg2fix.h
+++ b/mythtv/programs/mythtranscode/mpeg2fix.h
@@ -172,7 +172,7 @@ class MPEG2fixup
int AddFrame(MPEG2frame *f);
int InitAV(const char *inputfile, const char *type, int64_t offset);
void ScanAudio();
- bool ProcessVideo(MPEG2frame *vf, mpeg2dec_t *dec);
+ int ProcessVideo(MPEG2frame *vf, mpeg2dec_t *dec);
void WriteFrame(const char *filename, MPEG2frame *f);
void WriteFrame(const char *filename, AVPacket *pkt);
void WriteYUV(const char *filename, const mpeg2_info_t *info);