diff --git a/libeplayer3/output/writer/h264.c b/libeplayer3/output/writer/h264.c index fd78434..cfd01f2 100644 --- a/libeplayer3/output/writer/h264.c +++ b/libeplayer3/output/writer/h264.c @@ -300,7 +300,7 @@ static int writeData(void* _call) memcpy (NalData, call->data + VideoPosition, NalLengthBytes); VideoPosition += NalLengthBytes; NalStart += NalLengthBytes; - switch(NalLength) { + switch(NalLengthBytes) { case 1: NalLength = (NalData[0]); break; case 2: NalLength = (NalData[0] << 8) | (NalData[1]); break; case 3: NalLength = (NalData[0] << 16) | (NalData[1] << 8) | (NalData[2]); break;