Commit 936f59770c1d20f1eb654b2eaa6d53ffa6be9bbd
1 parent
056a7dbe
代码优化
Showing
1 changed file
with
2 additions
and
0 deletions
src/decoder/dvpp/DvppDecoder.cpp
@@ -702,6 +702,7 @@ int DvppDecoder::sendPkt(aclvdecChannelDesc *vdecChannelDesc, AVPacket* pkt, uns | @@ -702,6 +702,7 @@ int DvppDecoder::sendPkt(aclvdecChannelDesc *vdecChannelDesc, AVPacket* pkt, uns | ||
702 | CHECK_AND_BREAK(acldvppSetStreamDescSize(input_stream_desc, pkt->size), "acldvppSetStreamDescSize failed"); | 702 | CHECK_AND_BREAK(acldvppSetStreamDescSize(input_stream_desc, pkt->size), "acldvppSetStreamDescSize failed"); |
703 | CHECK_AND_BREAK(acldvppSetPicDescData(output_pic_desc, vdecOutputBuf), "acldvppSetPicDescData failed"); | 703 | CHECK_AND_BREAK(acldvppSetPicDescData(output_pic_desc, vdecOutputBuf), "acldvppSetPicDescData failed"); |
704 | CHECK_AND_BREAK(acldvppSetPicDescSize(output_pic_desc, m_vdec_out_size), "acldvppSetPicDescSize failed"); | 704 | CHECK_AND_BREAK(acldvppSetPicDescSize(output_pic_desc, m_vdec_out_size), "acldvppSetPicDescSize failed"); |
705 | + CHECK_AND_BREAK(acldvppSetPicDescRetCode(output_pic_desc, 0), "acldvppSetPicDescRetCode failed"); | ||
705 | 706 | ||
706 | Vdec_CallBack_UserData *user_data = NULL; | 707 | Vdec_CallBack_UserData *user_data = NULL; |
707 | user_data = new Vdec_CallBack_UserData; | 708 | user_data = new Vdec_CallBack_UserData; |
@@ -828,6 +829,7 @@ void DvppDecoder::doVdppVdecCallBack(acldvppStreamDesc *input, acldvppPicDesc *o | @@ -828,6 +829,7 @@ void DvppDecoder::doVdppVdecCallBack(acldvppStreamDesc *input, acldvppPicDesc *o | ||
828 | if (m_bResize && (width > 1920 || height > 1080)) { | 829 | if (m_bResize && (width > 1920 || height > 1080)) { |
829 | 830 | ||
830 | mem = m_vpcUtils.resize(output, out_frame_width, out_frame_height); | 831 | mem = m_vpcUtils.resize(output, out_frame_width, out_frame_height); |
832 | + CHECK_AND_RETURN_NOVALUE(aclrtSetCurrentContext(m_context), "aclrtSetCurrentContext failed"); | ||
831 | if (mem) { | 833 | if (mem) { |
832 | acldvppFree(outputDataDev); | 834 | acldvppFree(outputDataDev); |
833 | outputDataDev = nullptr; | 835 | outputDataDev = nullptr; |