avformat/network.h is not required here.
Showing the changes to tests/api (1 of 1 file). Show all
Unified · Split
| @@ -41,10 +41,10 @@ · 40 unmodified lines | ||
| 41 | 41 | #include <sys/stat.h> |
| 42 | 42 | #include <fcntl.h> |
| 43 | 43 | |
| 44 | −#include "libavformat/network.h" | |
| 45 | 44 | #include "libavcodec/avcodec.h" |
| 46 | 45 | #include "libavutil/pixdesc.h" |
| 47 | 46 | #include "libavutil/hash.h" |
| 47 | +#include "libavutil/bswap.h" | |
| 48 | 48 | |
| 49 | 49 | static int header = 0; |
| 50 | 50 | |
| @@ -191,7 +191,7 @@ int main(int argc, char **argv) · 140 unmodified lines | ||
| 191 | 191 | if (ret != sizeof(uint16_t)) |
| 192 | 192 | break; |
| 193 | 193 | |
| 194 | − size = ntohs(size); | |
| 194 | + size = av_be2ne16(size); | |
| 195 | 195 | ret = fread(p, 1, size, file); |
| 196 | 196 | if (ret != size) { |
| 197 | 197 | perror("Couldn't read data"); |