History

api-h264-slice-test: use av_be2ne16 instead of ntohs

avformat/network.h is not required here.

Peter Ross committed 7 years ago

Commit 7cda7d21 parent 57815cf1 file · +2 −2Browse files

Showing the changes to tests/api (1 of 1 file). Show all

Unified · Split

tests/api/api-h264-slice-test.c+2−2
@@ -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
49static int header = 0;49static 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");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t