Include libavformat/avformat.h before all the other libav* headers.
This is safer since they may use the symbol LIBAVFORMAT_BUILD defined in avformat.h. Originally committed as revision 16589 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		@@ -28,13 +28,14 @@
 | 
				
			|||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <strings.h>
 | 
					#include <strings.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include "libavutil/random.h"
 | 
					/* avformat.h defines LIBAVFORMAT_BUILD, include it before all the other libav* headers which use it */
 | 
				
			||||||
#include "libavutil/avstring.h"
 | 
					 | 
				
			||||||
#include "libavformat/avformat.h"
 | 
					#include "libavformat/avformat.h"
 | 
				
			||||||
#include "libavformat/network.h"
 | 
					#include "libavformat/network.h"
 | 
				
			||||||
#include "libavformat/os_support.h"
 | 
					#include "libavformat/os_support.h"
 | 
				
			||||||
#include "libavformat/rtp.h"
 | 
					#include "libavformat/rtp.h"
 | 
				
			||||||
#include "libavformat/rtsp.h"
 | 
					#include "libavformat/rtsp.h"
 | 
				
			||||||
 | 
					#include "libavutil/avstring.h"
 | 
				
			||||||
 | 
					#include "libavutil/random.h"
 | 
				
			||||||
#include "libavcodec/opt.h"
 | 
					#include "libavcodec/opt.h"
 | 
				
			||||||
#include <stdarg.h>
 | 
					#include <stdarg.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user