)]}'
{
  "commit": "80850ca477988836019b90a75eef07780b3ef77b",
  "tree": "69548b5123773d69de1c548dc59d8b36069ddc7e",
  "parents": [
    "9a2938b24c4adc086a17bc5661dde8a26ab0d5ff"
  ],
  "author": {
    "name": "Henrik Boström",
    "email": "hbos@webrtc.org",
    "time": "Wed Mar 22 17:08:00 2023"
  },
  "committer": {
    "name": "WebRTC LUCI CQ",
    "email": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Mar 23 10:46:17 2023"
  },
  "message": "Fix crash happening when changing from legacy to standard VP9.\n\nAttempting to ship \"WebRTC-AllowDisablingLegacyScalability\" revealed a\nDCHECK that happens when negotiating 3 VP9 streams prior to the\nsetParameters() call:\n1. By default, `scalability_mode` is missing, so those 3 streams\n   defaulted to legacy SVC, meaning only a single stream is used.\n2. Then, setParameters() was called to make\n   `encodings[0].scalability_mode \u003d \"L2T2_KEY\"` and\n   `encodings[1-2].active \u003d false`. The inactive streams were just\n   dummies and never expected to exist.\n\nWithout simulcast support this is OK, because both 1) and 2) are\ninterpreted to have a single stream. But with simulcast support, 1) is\ninterpreted as single stream and 2) as three streams (1 active, 2\ninactive). This should be roughly the same setup, but our code treats\nthem differently.\n\nThe DCHECK crash was a mismatch in number of streams in one of the\nlayers.\n\nThe fix is to re-create the streams when the number of streams change\nfor this reason. The new test revealed other issues and fixes too:\n- Support for multiple spatial layers (e.g. \"L2T2_KEY\") when multiple\n  encodings exist but only one encoding is active.\n- Allow inactive layers not to have a scalability mode set.\n\nA laundry list (https://crbug.com/webrtc/15028) has been created to\nupdate known places doing \"if streams \u003d\u003d 1\" that need to do \"if\nactive streams \u003d\u003d 1\" instead.\n\nCredit:\n  The RecreateWebRtcStream() fix is based on eshr@\u0027s POC from\n  https://webrtc-review.googlesource.com/c/src/+/298565.\n\nBug: webrtc:15016\nChange-Id: I909a3f83a4ef53562894549ade0a870b208cec7e\nReviewed-on: https://webrtc-review.googlesource.com/c/src/+/298443\nReviewed-by: Ilya Nikolaevskiy \u003cilnik@webrtc.org\u003e\nCommit-Queue: Henrik Boström \u003chbos@webrtc.org\u003e\nReviewed-by: Erik Språng \u003csprang@webrtc.org\u003e\nReviewed-by: Evan Shrubsole \u003ceshr@google.com\u003e\nCr-Commit-Position: refs/heads/main@{#39651}\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "494bbceb85594ecfb238b8f4ca9e993299e94943",
      "old_mode": 33188,
      "old_path": "media/engine/simulcast_encoder_adapter.cc",
      "new_id": "7ee95b1a300f53b577512e6801e767456d820f67",
      "new_mode": 33188,
      "new_path": "media/engine/simulcast_encoder_adapter.cc"
    },
    {
      "type": "modify",
      "old_id": "b3afbf9fd81b08991c65502469f0fc360cfe452f",
      "old_mode": 33188,
      "old_path": "media/engine/webrtc_video_engine.cc",
      "new_id": "7c7cc90ed83bce4da3483d89eea49dead7d1ebb8",
      "new_mode": 33188,
      "new_path": "media/engine/webrtc_video_engine.cc"
    },
    {
      "type": "modify",
      "old_id": "c468e996388df927bf683a2b42c764daa869503c",
      "old_mode": 33188,
      "old_path": "modules/video_coding/video_codec_initializer.cc",
      "new_id": "6f5f7d16fe35aae16d0adc0d41712d42a79c19e1",
      "new_mode": 33188,
      "new_path": "modules/video_coding/video_codec_initializer.cc"
    },
    {
      "type": "modify",
      "old_id": "9d0c9e2f0e511a781f65cf1e58c475be8b242719",
      "old_mode": 33188,
      "old_path": "pc/peer_connection_simulcast_unittest.cc",
      "new_id": "b8f1a7cdfbaaef42dac1e3f5c6c31384d5eaf934",
      "new_mode": 33188,
      "new_path": "pc/peer_connection_simulcast_unittest.cc"
    }
  ]
}
