Commit 44b1612
committed
avcodec/videotoolbox: fix decoding of some hevc videos
See https://s3.amazonaws.com/tmm1/videotoolbox/germany-hevc-zdf.ts
Although videotoolbox_buffer_create() sets frame->hw_frames_ctx,
by the time videotoolbox_postproc_frame() is called, some frames
randomly have frame->hw_frames_ctx == NULL. I don't really
understand what's going on, and why this only affects some frames
and only in some hevc videos.
This patch attempts to detect the missing hw_frames_ctx and reset
it in the post_process callback. This is obviously a huge hack, but
it does fix playback of the affected samples.1 parent e0734f7 commit 44b1612
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
0 commit comments