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,21 +667,19 @@ int vp8_decode_frame(VP8D_COMP *pbi)
|
|||||||
|
|
||||||
if (data_end - data < 3)
|
if (data_end - data < 3)
|
||||||
{
|
{
|
||||||
if (pbi->ec_active)
|
if (!pbi->ec_active)
|
||||||
{
|
|
||||||
/* Declare the missing frame as an inter frame since it will
|
|
||||||
be handled as an inter frame when we have estimated its
|
|
||||||
motion vectors. */
|
|
||||||
pc->frame_type = INTER_FRAME;
|
|
||||||
pc->version = 0;
|
|
||||||
pc->show_frame = 1;
|
|
||||||
first_partition_length_in_bytes = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME,
|
vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME,
|
||||||
"Truncated packet");
|
"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. */
|
||||||
|
pc->frame_type = INTER_FRAME;
|
||||||
|
pc->version = 0;
|
||||||
|
pc->show_frame = 1;
|
||||||
|
first_partition_length_in_bytes = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user