Mercurial > libavformat.hg
diff sdp.c @ 4812:f7bc722a3a36 libavformat
Only insert the SPS and PPS NALs in sprop-parameter-sets
Patch by Martin Storsj? (martin AT martin DOT st)
| author | lucabe |
|---|---|
| date | Mon, 06 Apr 2009 21:04:26 +0000 |
| parents | daca5391106a |
| children | 730b214077ca |
line wrap: on
line diff
--- 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++;
