Skip to content

Commit

Permalink
Address some unused value warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Nov 28, 2012
1 parent 237ec0d commit 3488de7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/cardutil.cpp
Expand Up @@ -2380,7 +2380,7 @@ QString CardUtil::GetHDHRdesc(const QString &device)
if (!validID || !hdhomerun_discover_validate_device_id(dev))
return QObject::tr("Invalid Device ID");
}

(void) deviceIsIP;

LOG(VB_GENERAL, LOG_INFO, "CardUtil::GetHDHRdescription(" + device +
") - trying to locate device");
Expand Down
13 changes: 8 additions & 5 deletions mythtv/libs/libmythtv/mpeg/H264Parser.cpp
Expand Up @@ -574,8 +574,6 @@ void H264Parser::processRBSP(bool rbsp_complete)
*/
bool H264Parser::decode_Header(GetBitContext *gb)
{
uint first_mb_in_slice;

is_keyframe = false;

if (log2_max_frame_num == 0 || pic_order_present_flag == -1)
Expand All @@ -601,7 +599,7 @@ bool H264Parser::decode_Header(GetBitContext *gb)
that precedes the current slice in decoding order and has the
same value of colour_plane_id.
*/
first_mb_in_slice = get_ue_golomb(gb);
//uint first_mb_in_slice = get_ue_golomb(gb);

/*
slice_type specifies the coding type of the slice according to
Expand Down Expand Up @@ -808,7 +806,6 @@ void H264Parser::decode_SPS(GetBitContext * gb)
int offset_for_non_ref_pic;
int offset_for_top_to_bottom_field;
uint tmp;
bool gaps_in_frame_num_allowed_flag;

/*
pic_order_cnt_type specifies the method to decode picture order
Expand Down Expand Up @@ -866,6 +863,8 @@ void H264Parser::decode_SPS(GetBitContext * gb)
for (uint idx = 0; idx < tmp; ++idx)
get_se_golomb(gb); // offset_for_ref_frame[i]
}
(void) offset_for_non_ref_pic; // suppress unused var warning
(void) offset_for_top_to_bottom_field; // suppress unused var warning

/*
num_ref_frames specifies the maximum number of short-term and
Expand All @@ -884,7 +883,7 @@ void H264Parser::decode_SPS(GetBitContext * gb)
decoding process in case of an inferred gap between values of
frame_num as specified in subclause 8.2.5.2.
*/
gaps_in_frame_num_allowed_flag = get_bits1(gb);
//bool gaps_in_frame_num_allowed_flag = get_bits1(gb);

/*
pic_width_in_mbs_minus1 plus 1 specifies the width of each
Expand Down Expand Up @@ -1067,6 +1066,10 @@ void H264Parser::decode_SEI(GetBitContext *gb)
break;
}
}

(void) exact_match_flag; // suppress unused var warning
(void) broken_link_flag; // suppress unused var warning
(void) changing_group_slice_idc; // suppress unused var warning
}

void H264Parser::vui_parameters(GetBitContext * gb)
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -1571,7 +1571,6 @@ void MythPlayer::EnableForcedSubtitles(bool enable)

void MythPlayer::SetAllowForcedSubtitles(bool allow)
{
bool old = allowForcedSubtitles;
allowForcedSubtitles = allow;
SetOSDMessage(allowForcedSubtitles ?
tr("Forced Subtitles On") :
Expand Down
9 changes: 4 additions & 5 deletions mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
Expand Up @@ -426,7 +426,6 @@ bool DTVRecorder::FindMPEG2Keyframes(const TSPacket* tspacket)
const uint8_t *bufptr = tspacket->data() + tspacket->AFCOffset();
const uint8_t *bufend = tspacket->data() + TSPacket::kSize;
int ext_type, bytes_left;
int picture_structure, top_field_first, repeat_first_field, progressive_frame;
_repeat_pict = 0;

while (bufptr < bufend)
Expand Down Expand Up @@ -475,10 +474,10 @@ bool DTVRecorder::FindMPEG2Keyframes(const TSPacket* tspacket)
case 0x8: /* picture coding extension */
if (bytes_left >= 5)
{
picture_structure = bufptr[2]&3;
top_field_first = bufptr[3] & (1 << 7);
repeat_first_field = bufptr[3] & (1 << 1);
progressive_frame = bufptr[4] & (1 << 7);
//int picture_structure = bufptr[2]&3;
int top_field_first = bufptr[3] & (1 << 7);
int repeat_first_field = bufptr[3] & (1 << 1);
int progressive_frame = bufptr[4] & (1 << 7);

/* check if we must repeat the frame */
_repeat_pict = 1;
Expand Down

0 comments on commit 3488de7

Please sign in to comment.