- use constants instead of hardcoded values.
- explicitly list expected nal types to be processed further.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2372
b64f7644-9d1e-0410-96f1-
a4d463321fa5
}
/* H.264 in .mp4 or .mkv */
- int naltype = buf->data[buf->size+4] & 0x1f;
- if ( naltype == 0x7 || naltype == 0x8 )
+ switch( nal[i].i_type )
{
- // Sequence Parameter Set & Program Parameter Set go in the
- // mp4 header so skip them here
- continue;
+ /* Sequence Parameter Set & Program Parameter Set go in the
+ * mp4 header so skip them here
+ */
+ case NAL_SPS:
+ case NAL_PPS:
+ continue;
+
+ case NAL_SLICE:
+ case NAL_SLICE_IDR:
+ case NAL_SEI:
+ default:
+ break;
}
/* H.264 in mp4 (stolen from mp4creator) */