[FFmpeg-devel] [PATCH] api-h264-slice-test: use av_be2ne16 instead of ntohs
Peter Ross
pross at xvid.org
Tue Nov 20 09:51:52 EET 2018
avformat/network.h is not required here.
---
tests/api/api-h264-slice-test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/api/api-h264-slice-test.c b/tests/api/api-h264-slice-test.c
index be03e80049..c6614da34d 100644
--- a/tests/api/api-h264-slice-test.c
+++ b/tests/api/api-h264-slice-test.c
@@ -41,10 +41,10 @@
#include <sys/stat.h>
#include <fcntl.h>
-#include "libavformat/network.h"
#include "libavcodec/avcodec.h"
#include "libavutil/pixdesc.h"
#include "libavutil/hash.h"
+#include "libavutil/bswap.h"
static int header = 0;
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
if (ret != sizeof(uint16_t))
break;
- size = ntohs(size);
+ size = av_be2ne16(size);
ret = fread(p, 1, size, file);
if (ret != size) {
perror("Couldn't read data");
--
2.17.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181120/79bd5667/attachment.sig>
More information about the ffmpeg-devel
mailing list