mirror of https://git.ffmpeg.org/ffmpeg.git
api-h264-slice-test: use av_be2ne16 instead of ntohs
avformat/network.h is not required here. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
57815cfad5
commit
7cda7d217c
|
@ -41,10 +41,10 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "libavformat/network.h"
|
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/hash.h"
|
#include "libavutil/hash.h"
|
||||||
|
#include "libavutil/bswap.h"
|
||||||
|
|
||||||
static int header = 0;
|
static int header = 0;
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ int main(int argc, char **argv)
|
||||||
if (ret != sizeof(uint16_t))
|
if (ret != sizeof(uint16_t))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
size = ntohs(size);
|
size = av_be2ne16(size);
|
||||||
ret = fread(p, 1, size, file);
|
ret = fread(p, 1, size, file);
|
||||||
if (ret != size) {
|
if (ret != size) {
|
||||||
perror("Couldn't read data");
|
perror("Couldn't read data");
|
||||||
|
|
Loading…
Reference in New Issue