remove uninitialized variable warning
Restructure if statement to clarify the error condition. Trigger the error before clobbering pc-> variables. Change-Id: Id01cab798a341ce9899078fdcec265a0e942a0b7
This commit is contained in:
parent
f182376dd6
commit
9409af2083
@ -667,8 +667,12 @@ int vp8_decode_frame(VP8D_COMP *pbi)
|
||||
|
||||
if (data_end - data < 3)
|
||||
{
|
||||
if (pbi->ec_active)
|
||||
if (!pbi->ec_active)
|
||||
{
|
||||
vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME,
|
||||
"Truncated packet");
|
||||
}
|
||||
|
||||
/* Declare the missing frame as an inter frame since it will
|
||||
be handled as an inter frame when we have estimated its
|
||||
motion vectors. */
|
||||
@ -678,12 +682,6 @@ int vp8_decode_frame(VP8D_COMP *pbi)
|
||||
first_partition_length_in_bytes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME,
|
||||
"Truncated packet");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pc->frame_type = (FRAME_TYPE)(data[0] & 1);
|
||||
pc->version = (data[0] >> 1) & 7;
|
||||
|
Loading…
x
Reference in New Issue
Block a user