[FFmpeg-trac] #11436(swscale:new): Changing stream properties (matrix/primaries/transfer) make FFMpeg crash
FFmpeg
trac at avcodec.org
Tue Jan 28 22:48:44 EET 2025
#11436: Changing stream properties (matrix/primaries/transfer) make FFMpeg crash
-------------------------------------+-------------------------------------
Reporter: Francesco | Type: defect
Bucciantini |
Status: new | Priority: normal
Component: swscale | Version: git-
| master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When a stream has different frame properties (i.e
matrix/transfer/primaries changing between frames) then FFMpeg crashes.
In particular, I've uploaded a sample called
XDCAM_50_With_Changing_Frame_Properties.mxf at
https://streams.videolan.org/upload/ (backup link
https://we.tl/t-qfePLdYbcM). It's an FULL HD 1920x1080 MPEG-2 High 4:2:2
Profile, Level High 50 Mbit/s yv16 25i TFF BT709 SDR file with the
following characteristics:
frame 1 to 13 (matrix, transfer, primaries as BT709)
frame 14 to 910 (matrix, transfer, primaries are missing)
frame 911 (matrix BT709, transfer, primaries are missing)
frame 912 to 922 (matrix, transfer, primaries as BT709)
If we index it in Avisynth with LWLibavVideoSource() we can in fact see
the frame properties changing as we move through the stream:
[[Image(https://i.imgur.com/wLiwn3J.png)]]
[[Image(https://i.imgur.com/oQWnTD9.png)]]
[[Image(https://i.imgur.com/ecVJW2G.png)]]
[[Image(https://i.imgur.com/9iLlHCt.png)]]
When opening the AVS Script.avs in FFMpeg, the frame properties from the
first frame are set and everything works normally, however, if we try to
open it with FFMpeg with a simple:
ffmpeg.exe -benchmark -i "XDCAM_50_With_Changing_Frame_Properties.mxf"
-map 0:0? -f null out.null
it crashes with:
[vf#0:0 @ 0000020c8cb36d40] Reconfiguring filter graph because video
parameters changed to yuv422p(tv, unknown), 1920x1080
[swscaler @ 0000020c8e93d140] Unsupported input (Error number -129
occurred): fmt:yuv422p csp:unknown prim:reserved trc:reserved ->
fmt:yuv422p csp:bt709 prim:reserved trc:reserved
[vf#0:0 @ 0000020c8cb36d40] Error while filtering: Error number -129
occurred
[vf#0:0 @ 0000020c8cb36d40] Task finished with error code: -129 (Error
number -129 occurred)
[vf#0:0 @ 0000020c8cb36d40] Terminating thread with return code -129
(Error number -129 occurred)
How to reproduce:
{{{
% ffmpeg -benchmark -i "XDCAM_50_With_Changing_Frame_Properties.mxf" -map
0:0? -f null out.null
ffmpeg version git-master
built on January 28th 2025
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11436>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list