)]}'
{
  "commit": "80da2cfea6e64be7467ddcea790a86162e0ebb97",
  "tree": "5443a396fb256aeaa9800618f3a4fd59824afc46",
  "parents": [
    "18fe786e24b3e66e0bd61ee7c625423239c5f84a"
  ],
  "author": {
    "name": "Vadim Ledyaev",
    "email": "55357489+voledyaev@users.noreply.github.com",
    "time": "Thu Sep 03 01:19:36 2026 +0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Sep 02 18:19:36 2026 +0000"
  },
  "message": "[video_player_android] Report display size for anamorphic video (#12360)\n\n`VideoSize.pixelWidthHeightRatio` was never read, so videos stored with non-square pixels (anamorphic content) reported their **coded** size instead of their **display** size. `VideoPlayerValue.size` therefore carried the wrong aspect ratio and such videos rendered stretched.\n\nExample of a real affected file: coded `1080x720` with a `3:8` pixel aspect ratio displays as `405x720`, but `size` was reported as `1080x720` — a 2.67x horizontal stretch.\n\nThis scales the reported width by the pixel aspect ratio, which is what media3\u0027s own [`PlayerView`](https://github.com/androidx/media/blob/release/libraries/ui/src/main/java/androidx/media3/ui/PlayerView.java) does:\n\n```java\nfloat videoAspectRatio \u003d (height \u003d\u003d 0 || width \u003d\u003d 0) ? 0 : (width * videoSize.pixelWidthHeightRatio) / height;\n```\n\nBoth event listeners are updated:\n\n- **Texture path** — ExoPlayer reports a `pixelWidthHeightRatio` that already accounts for any applied rotation (`MediaCodecVideoRenderer` inverts it for 90°/270°), so the ratio is applied to the reported width regardless of the rotation correction.\n- **Platform view path** — `Format.pixelWidthHeightRatio` describes the unrotated frame, so the ratio is applied *before* the existing width/height swap.\n\nThe scaling is skipped unless the ratio is greater than 0 and not 1, so playback of ordinary square-pixel video is byte-for-byte unchanged.\n\nVerified on a physical anamorphic sample (`1080x720`, SAR `3:8`) on Android 15: previously stretched, now rendered at the correct 9:16 display aspect. iOS is unaffected — `video_player_avfoundation` already reports `presentationSize`, which is pixel-aspect corrected, which is why this bug is Android-only.\n\n*(No before/after screenshots: the sample videos available to me are private medical content and cannot be published.)*\n\nFixes https://github.com/flutter/flutter/issues/132934\nFixes https://github.com/flutter/flutter/issues/94234\n\n## Pre-Review Checklist\n\n[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "73572031d236d06710aae739b1687156ea1f566c",
      "old_mode": 33188,
      "old_path": "packages/video_player/video_player_android/CHANGELOG.md",
      "new_id": "aac2125ca887739c2f85b480a247bf3a9dbd5a90",
      "new_mode": 33188,
      "new_path": "packages/video_player/video_player_android/CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "699eab6eb0c15bcfe671f9f970c770e513344b2a",
      "old_mode": 33188,
      "old_path": "packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/platformview/PlatformViewExoPlayerEventListener.java",
      "new_id": "65cb54c7f4fb67aa874b1116a92184879316edea",
      "new_mode": 33188,
      "new_path": "packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/platformview/PlatformViewExoPlayerEventListener.java"
    },
    {
      "type": "modify",
      "old_id": "bcc901b7218fe0fe4e39c6fd4fe58cd99ad160d0",
      "old_mode": 33188,
      "old_path": "packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/texture/TextureExoPlayerEventListener.java",
      "new_id": "519fef7b95b787405ef473f23dce7a6601cfed50",
      "new_mode": 33188,
      "new_path": "packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/texture/TextureExoPlayerEventListener.java"
    },
    {
      "type": "modify",
      "old_id": "516b857b67a5bbddabd241f69d52dd33a2c072d1",
      "old_mode": 33188,
      "old_path": "packages/video_player/video_player_android/android/src/test/java/io/flutter/plugins/videoplayer/PlatformViewExoPlayerEventListenerTest.java",
      "new_id": "3eddc321dc2cb614f8403cdb5243c8c0e815e9ec",
      "new_mode": 33188,
      "new_path": "packages/video_player/video_player_android/android/src/test/java/io/flutter/plugins/videoplayer/PlatformViewExoPlayerEventListenerTest.java"
    },
    {
      "type": "modify",
      "old_id": "e71cf619b885fca411fd1e85b6455ce4a3b60371",
      "old_mode": 33188,
      "old_path": "packages/video_player/video_player_android/android/src/test/java/io/flutter/plugins/videoplayer/TextureExoPlayerEventListenerTest.java",
      "new_id": "421af2e10ac74fd3e73962ae58da125d21c48ed3",
      "new_mode": 33188,
      "new_path": "packages/video_player/video_player_android/android/src/test/java/io/flutter/plugins/videoplayer/TextureExoPlayerEventListenerTest.java"
    },
    {
      "type": "modify",
      "old_id": "dc97eb5e281f105ad54a129ce960d69e4d121db2",
      "old_mode": 33188,
      "old_path": "packages/video_player/video_player_android/pubspec.yaml",
      "new_id": "fb3fca6317ac52265bc1a7ba64ab8bfcb31bd1d3",
      "new_mode": 33188,
      "new_path": "packages/video_player/video_player_android/pubspec.yaml"
    }
  ]
}
