summaryrefslogtreecommitdiff
path: root/package/vlc/patches/patch-modules_codec_avcodec_video_c
blob: c9d3fb226a80d2f06c777f3ec95ae9ad34b22abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- vlc-2.2.6.orig/modules/codec/avcodec/video.c	2016-09-27 09:56:26.000000000 +0200
+++ vlc-2.2.6/modules/codec/avcodec/video.c	2017-06-06 22:52:46.745071498 +0200
@@ -108,8 +108,8 @@ static int lavc_GetFrame(struct AVCodecC
 static int  ffmpeg_GetFrameBuf    ( struct AVCodecContext *, AVFrame * );
 static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
 #endif
-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
-                                          const enum PixelFormat * );
+static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *,
+                                          const enum AVPixelFormat * );
 
 static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
 {
@@ -234,7 +234,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
     p_sys->p_codec = p_codec;
     p_sys->i_codec_id = i_codec_id;
     p_sys->psz_namecodec = psz_namecodec;
-    p_sys->p_ff_pic = avcodec_alloc_frame();
+    p_sys->p_ff_pic = av_frame_alloc();
     p_sys->b_delayed_open = true;
     p_sys->p_va = NULL;
     vlc_sem_init( &p_sys->sem_mt, 0 );
@@ -446,7 +446,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
     if( ffmpeg_OpenCodec( p_dec ) < 0 )
     {
         msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
-        avcodec_free_frame( &p_sys->p_ff_pic );
+        av_frame_free( &p_sys->p_ff_pic );
         vlc_sem_destroy( &p_sys->sem_mt );
         free( p_sys );
         return VLC_EGENERIC;
@@ -847,7 +847,7 @@ void EndVideoDec( decoder_t *p_dec )
     wait_mt( p_sys );
 
     if( p_sys->p_ff_pic )
-        avcodec_free_frame( &p_sys->p_ff_pic );
+        av_frame_free( &p_sys->p_ff_pic );
 
     if( p_sys->p_va )
         vlc_va_Delete( p_sys->p_va );
@@ -1334,8 +1334,8 @@ static void ffmpeg_ReleaseFrameBuf( stru
 }
 #endif
 
-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
-                                          const enum PixelFormat *pi_fmt )
+static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
+                                          const enum AVPixelFormat *pi_fmt )
 {
     decoder_t *p_dec = p_context->opaque;
     decoder_sys_t *p_sys = p_dec->p_sys;