[Live-devel] x264 nal unist and H264VideoStreamDiscreteFramer

Фазлеев Максим Anarchist666 at yandex.ru
Sat Jan 21 01:48:59 PST 2012


libx264 returns a pointer to an array of NAL units during encoding using the function x264_encoder_encode. But i can't feed them H264VideoStreamDiscreteFramer.

My code in DeviceSource:
    ...
    newFrameDataStart = (u_int8_t*)(nals[current_nal].p_payload);
    newFrameSize = nals[current_nal].i_payload;
    printf("nal type = %i\n", nals[current_nal].i_type);
    ...
    printf("newFrameSize = %i   fTo[0]&0x1F = %i\n", newFrameSize, fTo[0]&0x1F);

Output:
nal type = 7
newFrameSize = 28   fTo[0]&0x1F = 0
Warning: Invalid 'nal_unit_type': 0.  Does the NAL unit begin with a MPEG 'start code' by mistake?
nal type = 8
newFrameSize = 8   fTo[0]&0x1F = 0
Warning: Invalid 'nal_unit_type': 0.  Does the NAL unit begin with a MPEG 'start code' by mistake?
nal type = 6
newFrameSize = 575   fTo[0]&0x1F = 0
Warning: Invalid 'nal_unit_type': 0.  Does the NAL unit begin with a MPEG 'start code' by mistake?
nal type = 5
newFrameSize = 5170   fTo[0]&0x1F = 0
Warning: Invalid 'nal_unit_type': 0.  Does the NAL unit begin with a MPEG 'start code' by mistake?
nal type = 1
newFrameSize = 344   fTo[0]&0x1F = 0
Warning: Invalid 'nal_unit_type': 0.  Does the NAL unit begin with a MPEG 'start code' by mistake?


More information about the live-devel mailing list