Skip to content

Commit

Permalink
Make MPEG2fixup::ProcessVideo return int
Browse files Browse the repository at this point in the history
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
(cherry picked from commit 0234965)
  • Loading branch information
Beirdo committed Feb 28, 2011
1 parent 6e5ca62 commit bbfb6b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mythtv/programs/mythtranscode/mpeg2fix.cpp
Expand Up @@ -836,7 +836,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;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythtranscode/mpeg2fix.h
Expand Up @@ -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);
Expand Down

0 comments on commit bbfb6b0

Please sign in to comment.