In preparation for MVC support.
return AVERROR_INVALIDDATA;
}
- if (h->pps.sps_id != h->current_sps_id ||
+ if (h->pps.sps_id != h->sps.sps_id ||
h0->sps_buffers[h->pps.sps_id]->new) {
h0->sps_buffers[h->pps.sps_id]->new = 0;
- h->current_sps_id = h->pps.sps_id;
- h->sps = *h0->sps_buffers[h->pps.sps_id];
+ h->sps = *h0->sps_buffers[h->pps.sps_id];
if (h->bit_depth_luma != h->sps.bit_depth_luma ||
h->chroma_format_idc != h->sps.chroma_format_idc) {
* Sequence parameter set
*/
typedef struct SPS {
+ unsigned int sps_id;
int profile_idc;
int level_idc;
int chroma_format_idc;
ptrdiff_t mb_linesize; ///< may be equal to s->linesize or s->linesize * 2, for mbaff
ptrdiff_t mb_uvlinesize;
- unsigned current_sps_id; ///< id of the current SPS
SPS sps; ///< current sps
/**
if (!sps)
return AVERROR(ENOMEM);
+ sps->sps_id = sps_id;
sps->time_offset_length = 24;
sps->profile_idc = profile_idc;
sps->constraint_set_flags = constraint_set_flags;
av_free(h->sps_buffers[sps_id]);
h->sps_buffers[sps_id] = sps;
h->sps = *sps;
- h->current_sps_id = sps_id;
return 0;