Fixed bug with videoDecodeBatch (#375)
* fixed bug with videoDecodeBatch * changed if statement to check n_frame_returned
This commit is contained in:
@@ -125,9 +125,11 @@ void DecProc(RocVideoDecoder *p_dec, VideoDemuxer *demuxer, int *pn_frame, doubl
|
||||
n_frame_returned = p_dec->DecodeFrame(p_video, n_video_bytes, 0, pts);
|
||||
n_frame += n_frame_returned;
|
||||
if (b_dump_output_frames && mem_type != OUT_SURFACE_MEM_NOT_MAPPED) {
|
||||
if (!n_frame && !p_dec->GetOutputSurfaceInfo(&surf_info)) {
|
||||
std::cerr << "Error: Failed to get Output Surface Info!" << std::endl;
|
||||
break;
|
||||
if (n_frame_returned) {
|
||||
if (!p_dec->GetOutputSurfaceInfo(&surf_info)) {
|
||||
std::cerr << "Error: Failed to get Output Surface Info!" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < n_frame_returned; i++) {
|
||||
p_frame = p_dec->GetFrame(&pts);
|
||||
|
||||
Reference in New Issue
Block a user