Commit e7bb1508 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Avparser: fix compilation with some older libav/FFmpeg versions

Ref #12135
parent 3e51cde9
......@@ -38,6 +38,20 @@
#include "../codec/avcodec/avcommon.h"
#include "avparser.h"
#if !LIBAVCODEC_VERSION_CHECK( 55, 52, 0, 63, 100 )
#include <libavutil/mem.h>
static inline void avcodec_free_context( AVCodecContext **ctx )
{
if( !*ctx )
return;
av_free( (*ctx)->extradata );
av_free( *ctx );
*ctx = NULL;
}
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment