1
0
Fork 0

h264: set h->sps if none is set yet

This commit is contained in:
Hendrik Leppkes 2013-05-11 23:19:59 +02:00
parent a8f55b41a0
commit 0363fc2bb5
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 14 additions and 0 deletions

View File

@ -417,6 +417,20 @@ FF_ENABLE_DEPRECATION_WARNINGS
ret = 0;
}
}
/* activate the first SPS to determine basic stream information */
if (!h->ps.sps) {
int i;
for (i = 0; i < FF_ARRAY_ELEMS(h->ps.pps_list) && !h->ps.sps; i++) {
if (h->ps.pps_list[i]) {
h->ps.pps_ref = av_buffer_ref(h->ps.pps_list[i]);
if (!h->ps.pps_list)
return AVERROR(ENOMEM);
h->ps.pps = (const PPS*)h->ps.pps_ref->data;
h->ps.sps = h->ps.pps->sps;
}
}
}
}
if (h->ps.sps) {