Changeset 5925
- Timestamp:
- Dec 17, 2018 3:46:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/openh264.cpp
r5440 r5925 964 964 unsigned i, frm_cnt; 965 965 pj_status_t status = PJ_SUCCESS; 966 DECODING_STATE ret; 966 967 967 968 PJ_ASSERT_RETURN(codec && count && packets && out_size && output, … … 1046 1047 oh264_data->dec->DecodeFrame2( start, frm_size, pData, &sDstBufInfo); 1047 1048 1048 if (sDstBufInfo.iBufferStatus == 1) { 1049 if (0 && sDstBufInfo.iBufferStatus == 1) { 1050 // Better to just get the frame later after all NALs are consumed 1051 // by the decoder, it should have the best quality and save some 1052 // CPU load. 1049 1053 /* May overwrite existing frame but that's ok. */ 1050 1054 status = oh264_got_decoded_frame(codec, oh264_data, pData, … … 1069 1073 pj_bzero(pData, sizeof(pData)); 1070 1074 pj_bzero(&sDstBufInfo, sizeof (SBufferInfo)); 1071 oh264_data->dec->DecodeFrame2 (NULL, 0, pData, &sDstBufInfo); 1072 1073 if (sDstBufInfo.iBufferStatus == 1) { 1075 ret = oh264_data->dec->DecodeFrame2 (NULL, 0, pData, &sDstBufInfo); 1076 1077 if (sDstBufInfo.iBufferStatus == 1 && 1078 !(ret & dsRefLost) && !(ret & dsNoParamSets) && 1079 !(ret & dsDepLayerLost)) 1080 { 1074 1081 /* Overwrite existing output frame and that's ok, because we assume 1075 1082 * newer frame have better quality because it has more NALs … … 1081 1088 } 1082 1089 1083 if ( !has_frame) {1090 if (ret != dsErrorFree) { 1084 1091 pjmedia_event event; 1085 1092 … … 1090 1097 PJMEDIA_EVENT_PUBLISH_DEFAULT); 1091 1098 1092 PJ_LOG(5,(THIS_FILE, "Decode couldn't produce picture, " 1093 "input nframes=%d, concatenated size=%d bytes", 1094 count, whole_len)); 1095 1099 if (has_frame) { 1100 PJ_LOG(5,(oh264_data->pool->obj_name, 1101 "Decoder returned non error free frame, ret=%d", ret)); 1102 } 1103 } 1104 1105 if (!has_frame) { 1096 1106 output->type = PJMEDIA_FRAME_TYPE_NONE; 1097 1107 output->size = 0; 1098 1108 output->timestamp = packets[0].timestamp; 1109 1110 PJ_LOG(5,(THIS_FILE, "Decode couldn't produce picture, " 1111 "input nframes=%d, concatenated size=%d bytes, ret=%d", 1112 count, whole_len, ret)); 1099 1113 } 1100 1114
Note: See TracChangeset
for help on using the changeset viewer.