# HG changeset patch # User lucabe # Date 1239051866 0 # Node ID f7bc722a3a3616f83b84a1d67deb8c568e86f5e0 # Parent ef366aa6b7f2da28d099b6ec76ad140835125754 Only insert the SPS and PPS NALs in sprop-parameter-sets Patch by Martin Storsj (martin AT martin DOT st) diff -r ef366aa6b7f2 -r f7bc722a3a36 sdp.c --- a/sdp.c Fri Apr 03 15:32:31 2009 +0000 +++ b/sdp.c Mon Apr 06 21:04:26 2009 +0000 @@ -116,9 +116,15 @@ r = ff_avc_find_startcode(c->extradata, c->extradata + c->extradata_size); while (r < c->extradata + c->extradata_size) { const uint8_t *r1; + uint8_t nal_type; while (!*(r++)); + nal_type = *r & 0x1f; r1 = ff_avc_find_startcode(r, c->extradata + c->extradata_size); + if (nal_type != 7 && nal_type != 8) { /* Only output SPS and PPS */ + r = r1; + continue; + } if (p != (psets + strlen(pset_string))) { *p = ','; p++;