HarmonyOS 首帧无xps信息的流解码失败?

首帧无xps信息的流解码失败,错误打印:

08-08 14:39:04.302  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[pps_sps_check_tmp_id]:[6319] pps is null ppsid = 0 havn't decode
08-08 14:39:04.302  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[process_slice_header_first_part_judging]:[6927] PPS or SPS of this slice not valid
08-08 14:39:04.302  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[process_slice_header_first_part]:[6953] process_slice_header_first_part_judging
08-08 14:39:04.302  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[inquire_slice_property]:[10388] sliceheader dec err
08-08 14:39:04.302  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[h264_dec_decode_packet_add_svc]:[10786] H264DEC inquire_slice_property error.
08-08 14:39:04.302 33082 33237 F A00000/mgplayer: [Codec_OnNeedInputBuffer 161] video callback codec: 0x5babd9fd00, index: 2, buffer: 0x5aa7bf9d80
08-08 14:39:04.303  1296 37285 W C02B90/VCODEC: [nodict]VIDEO:[dec_check]:[6159] ctx->cur_pic.frame_store is NULL
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[pps_sps_check_tmp_id]:[6319] pps is null ppsid = 0 havn't decode
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[process_slice_header_first_part_judging]:[6927] PPS or SPS of this slice not valid
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[process_slice_header_first_part]:[6953] process_slice_header_first_part_judging
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[inquire_slice_property]:[10388] sliceheader dec err
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[h264_dec_decode_packet_add_svc]:[10786] H264DEC inquire_slice_property error.
08-08 14:39:04.303  1296 37285 W C02B90/VCODEC: [nodict]VIDEO:[dec_check]:[6159] ctx->cur_pic.frame_store is NULL
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[pps_sps_check_tmp_id]:[6319] pps is null ppsid = 0 havn't decode
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[process_slice_header_first_part_judging]:[6927] PPS or SPS of this slice not valid
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[process_slice_header_first_part]:[6953] process_slice_header_first_part_judging
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[inquire_slice_property]:[10388] sliceheader dec err
08-08 14:39:04.303  1296 37285 E C02B90/VCODEC: [nodict]VIDEO:[h264_dec_decode_packet_add_svc]:[10786] H264DEC inquire_slice_property error.
08-08 14:39:04.303  1296 37285 W C02B90/VCODEC: [nodict]VIDEO:[dec_check]:[6159] ctx->cur_pic.frame_store is NULL

解码器start之后,先向解码器塞入xps信息,也依然报错。

阅读 575
1 个回答

增加了SetBufferAttr方法,问题即可解决。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进