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