[FFmpeg-cvslog] r18343 - trunk/libavformat/sdp.c
lucabe
subversion
Mon Apr 6 23:04:26 CEST 2009
Author: lucabe
Date: Mon Apr 6 23:04:26 2009
New Revision: 18343
Log:
Only insert the SPS and PPS NALs in sprop-parameter-sets
Patch by Martin Storsj? (martin AT martin DOT st)
Modified:
trunk/libavformat/sdp.c
Modified: trunk/libavformat/sdp.c
==============================================================================
--- trunk/libavformat/sdp.c Mon Apr 6 19:44:31 2009 (r18342)
+++ trunk/libavformat/sdp.c Mon Apr 6 23:04:26 2009 (r18343)
@@ -116,9 +116,15 @@ static char *extradata2psets(AVCodecCont
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++;
More information about the ffmpeg-cvslog
mailing list