We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8c959a commit f44d2f0Copy full SHA for f44d2f0
libvisual/libvisual/private/lv_video_png.cpp
@@ -62,6 +62,11 @@ namespace LV {
62
63
png_byte signature[8];
64
input.read (reinterpret_cast<char*> (signature), sizeof (signature));
65
+ input.seekg (saved_stream_pos);
66
+
67
+ if (!input) {
68
+ return nullptr;
69
+ }
70
71
bool is_png = !png_sig_cmp (signature, 0, sizeof (signature));
72
@@ -100,6 +105,8 @@ namespace LV {
100
105
return nullptr;
101
106
}
102
107
108
+ input.seekg (sizeof (signature), std::ios::cur);
109
103
110
png_set_read_fn (png_ptr, &input, handle_png_read);
104
111
112
png_set_sig_bytes (png_ptr, sizeof (signature));
0 commit comments