am 49e1ae22: Merge "Sometimes the avc software decoder will signal that a frame is ready but then unexpectedly fail to return the frame... stop asserting on that and return an error instead." into gingerbread
Merge commit '49e1ae22801f5f9e620552ffd205b05a0d89f65f' into gingerbread-plus-aosp * commit '49e1ae22801f5f9e620552ffd205b05a0d89f65f': Sometimes the avc software decoder will signal that a frame is ready but then unexpectedly fail to return the frame... stop asserting on that and return an error instead.
This commit is contained in:
@@ -317,7 +317,7 @@ status_t AVCDecoder::read(
|
|||||||
&nalType, &nalRefIdc);
|
&nalType, &nalRefIdc);
|
||||||
|
|
||||||
if (res != AVCDEC_SUCCESS) {
|
if (res != AVCDEC_SUCCESS) {
|
||||||
LOGE("cannot determine nal type");
|
LOGV("cannot determine nal type");
|
||||||
} else if (nalType == AVC_NALTYPE_SPS || nalType == AVC_NALTYPE_PPS
|
} else if (nalType == AVC_NALTYPE_SPS || nalType == AVC_NALTYPE_PPS
|
||||||
|| (mSPSSeen && mPPSSeen)) {
|
|| (mSPSSeen && mPPSSeen)) {
|
||||||
switch (nalType) {
|
switch (nalType) {
|
||||||
@@ -330,6 +330,7 @@ status_t AVCDecoder::read(
|
|||||||
fragSize);
|
fragSize);
|
||||||
|
|
||||||
if (res != AVCDEC_SUCCESS) {
|
if (res != AVCDEC_SUCCESS) {
|
||||||
|
LOGV("PVAVCDecSeqParamSet returned error %d", res);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,6 +397,7 @@ status_t AVCDecoder::read(
|
|||||||
fragSize);
|
fragSize);
|
||||||
|
|
||||||
if (res != AVCDEC_SUCCESS) {
|
if (res != AVCDEC_SUCCESS) {
|
||||||
|
LOGV("PVAVCDecPicParamSet returned error %d", res);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,8 +420,13 @@ status_t AVCDecoder::read(
|
|||||||
AVCFrameIO Output;
|
AVCFrameIO Output;
|
||||||
Output.YCbCr[0] = Output.YCbCr[1] = Output.YCbCr[2] = NULL;
|
Output.YCbCr[0] = Output.YCbCr[1] = Output.YCbCr[2] = NULL;
|
||||||
|
|
||||||
CHECK_EQ(PVAVCDecGetOutput(mHandle, &index, &Release, &Output),
|
AVCDec_Status status =
|
||||||
AVCDEC_SUCCESS);
|
PVAVCDecGetOutput(mHandle, &index, &Release, &Output);
|
||||||
|
|
||||||
|
if (status != AVCDEC_SUCCESS) {
|
||||||
|
LOGV("PVAVCDecGetOutput returned error %d", status);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
CHECK(index >= 0);
|
CHECK(index >= 0);
|
||||||
CHECK(index < (int32_t)mFrames.size());
|
CHECK(index < (int32_t)mFrames.size());
|
||||||
@@ -466,7 +473,7 @@ status_t AVCDecoder::read(
|
|||||||
|
|
||||||
err = OK;
|
err = OK;
|
||||||
} else {
|
} else {
|
||||||
LOGV("failed to decode frame (res = %d)", res);
|
LOGV("PVAVCDecodeSlice returned error %d", res);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user