History

Merge commit '13ca5d34ba5c473211daaae0a101123bcaada3e6'

* commit '13ca5d34ba5c473211daaae0a101123bcaada3e6': 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.

Mark Thompson committed 8 years ago

Commit b656fa72 parents af3727e 13ca5d31 file · +16 −0Browse files

Unified · Split

libavcodec/cbs_h264_syntax_template.c+16−0
@@ -560,6 +560,22 @@ static int FUNC(sei_pic_timing)(CodedBitstreamContext *ctx, RWContext *rw, · 559 unmodified lines
560560 int err;
561561
562562 sps = h264->active_sps;
563+ if (!sps) {
564+ // If there is exactly one possible SPS but it is not yet active
565+ // then just assume that it should be the active one.
566+ int i, k = -1;
567+ for (i = 0; i < H264_MAX_SPS_COUNT; i++) {
568+ if (h264->sps[i]) {
569+ if (k >= 0) {
570+ k = -1;
571+ break;
572+ }
573+ k = i;
574+ }
575+ }
576+ if (k >= 0)
577+ sps = h264->sps[k];
578+ }
563579 if (!sps) {
564580 av_log(ctx->log_ctx, AV_LOG_ERROR,
565581 "No active SPS for pic_timing.\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t