path: root/
diff options
authorwm4 <wm4@nowhere>2019-11-08 17:20:57 +0100
committerwm4 <wm4@nowhere>2019-11-08 21:22:49 +0100
commit1edb3d061bd88e86cba05e9383d6decb4a13950b (patch)
tree18b5438f040464f841c5e0b9ae0a877175759c75 /
parenta6c8b4efa59628a755755c510aa9ee6db2728fb9 (diff)
test: add dumping of img_format metadata
This is fragile enough that it warrants getting "monitored". This takes the commented test program code from img_format.c, makes it output to a text file, and then compares it to a "ref" file stored in git. Originally, I wanted to do the comparison etc. in a shell or Python script. But why not do it in C. So mpv calls /usr/bin/diff as a sub-process now. This test will start producing different output if FFmpeg adds new pixel formats or pixel format flags, or if mpv adds new IMGFMT (either aliases to FFmpeg formats or own formats). That is unavoidable, and requires manual inspection of the results, and then updating the ref file. The changes in the non-test code are to guarantee that the format ID conversion functions only translate between valid IDs.
Diffstat (limited to '')
1 files changed, 1 insertions, 0 deletions
diff --git a/ b/
index ff0b0b746f..ffb7bebb9c 100644
--- a/
+++ b/
@@ -397,6 +397,7 @@ def build(ctx):
## Tests
( "test/chmap.c", "tests" ),
( "test/gl_video.c", "tests" ),
+ ( "test/img_format.c", "tests" ),
( "test/json.c", "tests" ),
( "test/linked_list.c", "tests" ),
( "test/tests.c", "tests" ),