Commit d92f3ca2 authored by lucabe's avatar lucabe

Only insert the SPS and PPS NALs in sprop-parameter-sets

Patch by Martin Storsjö (martin AT martin DOT st)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18343 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent db0920f8
......@@ -116,9 +116,15 @@ static char *extradata2psets(AVCodecContext *c)
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++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment