Commit b656fa71 authored by Mark Thompson's avatar Mark Thompson

Merge commit '13ca5d34'

* commit '13ca5d34':
  cbs_h264: Add hack for pic_timing with no active SPS

Partially fixes #6896 - the sample stream from that ticket now works, but
more obscure cases can still fail.
Merged-by: 's avatarMark Thompson <sw@jkqxz.net>
parents af3727e2 13ca5d34
......@@ -560,6 +560,22 @@ static int FUNC(sei_pic_timing)(CodedBitstreamContext *ctx, RWContext *rw,
int err;
sps = h264->active_sps;
if (!sps) {
// If there is exactly one possible SPS but it is not yet active
// then just assume that it should be the active one.
int i, k = -1;
for (i = 0; i < H264_MAX_SPS_COUNT; i++) {
if (h264->sps[i]) {
if (k >= 0) {
k = -1;
break;
}
k = i;
}
}
if (k >= 0)
sps = h264->sps[k];
}
if (!sps) {
av_log(ctx->log_ctx, AV_LOG_ERROR,
"No active SPS for pic_timing.\n");
......
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