Fix AV Packets with flag in first byte + Test

This commit is contained in:
Florian Märkl 2019-06-30 15:11:50 +02:00
commit b0e0cbec0b
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
4 changed files with 358 additions and 0 deletions

View file

@ -1132,6 +1132,12 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_takion_av_packet_parse(ChiakiTakionAVPacket
//av_size -= 2;
}
if(packet->uses_nalu_info_structs)
{
av += 3;
av_size -= 3;
}
packet->data = av;
packet->data_size = av_size;

View file

@ -98,6 +98,7 @@ CHIAKI_EXPORT void chiaki_video_receiver_av_packet(ChiakiVideoReceiver *video_re
if(chiaki_frame_processor_flush(&video_receiver->frame_processor, &frame, &frame_size) == CHIAKI_FRAME_PROCESSOR_FLUSH_RESULT_SUCCESS)
{
//CHIAKI_LOGD(video_receiver->log, "Decoded frame %d\n", (int)video_receiver->frame_index_cur);
//chiaki_log_hexdump(video_receiver->log, CHIAKI_LOG_DEBUG, frame, frame_size);
if(video_receiver->session->video_sample_cb)
video_receiver->session->video_sample_cb(frame, frame_size, video_receiver->session->video_sample_cb_user);
free(frame);
@ -125,5 +126,6 @@ CHIAKI_EXPORT void chiaki_video_receiver_av_packet(ChiakiVideoReceiver *video_re
//CHIAKI_LOGD(video_receiver->log, "Putting unit %lu of frame %d in processor\n",
// (unsigned int)packet->unit_index, (int)video_receiver->frame_index_cur);
//chiaki_log_hexdump(video_receiver->log, CHIAKI_LOG_DEBUG, packet->data, packet->data_size);
chiaki_frame_processor_put_unit(&video_receiver->frame_processor, packet);
}