Commit 2579160b authored by François Grisez's avatar François Grisez
Browse files

Fix logic errors in H265 packer and unpacker

parent 49f3fb75
......@@ -99,7 +99,7 @@ void H265NalPacker::NaluSpliter::feed(mblk_t *nalu) {
naluHeader.setType(H265NaluType::Fu);
while (msgdsize(nalu) > _maxSize) {
ms_queue_put(&_q, makeFu(naluHeader, fuHeader, nalu->b_rptr, _maxSize));
ms_queue_put(&_q, makeFu(naluHeader, fuHeader, nalu->b_rptr, msgdsize(nalu)));
fuHeader.setPosition(H265FuHeader::Position::Middle);
nalu->b_rptr += _maxSize;
}
......
......@@ -31,7 +31,7 @@ mblk_t *H265NalUnpacker::FuAggregator::feed(mblk_t *packet) {
return nullptr;
}
H265FuHeader fuHeader(packet->b_rptr + 3);
H265FuHeader fuHeader(packet->b_rptr + 2);
packet->b_rptr += 4;
if (fuHeader.getPosition() == H265FuHeader::Position::Start && isAggregating()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment