FAILURE MAP
← Case archive

FA-11206 / Media timeline seeking / Open access

Presentation order distinct from decode · case 01

Decoded B-frames are displayed in decode order instead of presentation order.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Decoded B-frames are displayed in decode order instead of presentation order.

VERIFIED REPAIR

Preserve the media contract: Frames are [decode timestamp,presentation timestamp,payload]. Return stable presentation order, retaining input order for equal presentation timestamps.

Unsuccessful approach: Sorting decode timestamps explicitly preserves the wrong temporal order.

Case contract

Frames are [decode timestamp,presentation timestamp,payload]. Return stable presentation order, retaining input order for equal presentation timestamps.

Why this case matters

A deterministic local media controller stage; metadata and downloaded data are supplied explicitly. No external player, service or codec is required.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames):
    return list(frames)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0, 0, 'I'], [1, 2, 'P'], [2, 1, 'B']],)),[[0, 0, 'I'], [2, 1, 'B'], [1, 2, 'P']])
check('fixture 2',solve(*([],)),[])
check('fixture 3',solve(*([[2, 0, 'a'], [1, 0, 'b']],)),[[2, 0, 'a'], [1, 0, 'b']])
check('fixture 4',solve(*([[0, 1, 'a']],)),[[0, 1, 'a']])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[[0, 0, 'I'], [1, 2, 'P'], [2, 1, 'B']][[0, 0, 'I'], [2, 1, 'B'], [1, 2, 'P']]Failed
fixture 2[][]Passed
fixture 3[[2, 0, 'a'], [1, 0, 'b']][[2, 0, 'a'], [1, 0, 'b']]Passed
fixture 4[[0, 1, 'a']][[0, 1, 'a']]Passed

SHA-256 / 9165d3187cd57f856d77719ddf599011dee539e208ce1f4f54161114e49ad06f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames):
    return sorted(frames,key=lambda f:f[0])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0, 0, 'I'], [1, 2, 'P'], [2, 1, 'B']],)),[[0, 0, 'I'], [2, 1, 'B'], [1, 2, 'P']])
check('fixture 2',solve(*([],)),[])
check('fixture 3',solve(*([[2, 0, 'a'], [1, 0, 'b']],)),[[2, 0, 'a'], [1, 0, 'b']])
check('fixture 4',solve(*([[0, 1, 'a']],)),[[0, 1, 'a']])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[[0, 0, 'I'], [1, 2, 'P'], [2, 1, 'B']][[0, 0, 'I'], [2, 1, 'B'], [1, 2, 'P']]Failed
fixture 2[][]Passed
fixture 3[[1, 0, 'b'], [2, 0, 'a']][[2, 0, 'a'], [1, 0, 'b']]Failed
fixture 4[[0, 1, 'a']][[0, 1, 'a']]Passed

SHA-256 / 1345cc4cb6d1d14634d6a7cfedcf5180ebece535c119076e80c5b85215a7b2f4

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames):
    return sorted(frames,key=lambda f:f[1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0, 0, 'I'], [1, 2, 'P'], [2, 1, 'B']],)),[[0, 0, 'I'], [2, 1, 'B'], [1, 2, 'P']])
check('fixture 2',solve(*([],)),[])
check('fixture 3',solve(*([[2, 0, 'a'], [1, 0, 'b']],)),[[2, 0, 'a'], [1, 0, 'b']])
check('fixture 4',solve(*([[0, 1, 'a']],)),[[0, 1, 'a']])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[[0, 0, 'I'], [2, 1, 'B'], [1, 2, 'P']][[0, 0, 'I'], [2, 1, 'B'], [1, 2, 'P']]Passed
fixture 2[][]Passed
fixture 3[[2, 0, 'a'], [1, 0, 'b']][[2, 0, 'a'], [1, 0, 'b']]Passed
fixture 4[[0, 1, 'a']][[0, 1, 'a']]Passed

SHA-256 / a4135958fcff2f968434bc00ab2fe84cbbff02fc7ec9fbec3f5d19900b02d0c2

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:45.939253+00:00.

Case digest / 9ae2e3a17a5c7fe7ddf6232aaf0afef514f657ad62b04c65716d17dade8c3ea9