Mercurial > mplayer.hg
comparison libvo/vo_dxr3.c @ 5397:23b4c6b1b129
Fixed avcodec init bug
author | mswitch |
---|---|
date | Sat, 30 Mar 2002 06:24:49 +0000 |
parents | f7402401318c |
children | 78bd1fa449c3 |
comparison
equal
deleted
inserted
replaced
5396:28aacc467e13 | 5397:23b4c6b1b129 |
---|---|
81 #include "fastmemcpy.h" | 81 #include "fastmemcpy.h" |
82 | 82 |
83 #include "video_out.h" | 83 #include "video_out.h" |
84 #include "video_out_internal.h" | 84 #include "video_out_internal.h" |
85 #include "aspect.h" | 85 #include "aspect.h" |
86 #include "../postproc/rgb2rgb.h" | 86 #include "postproc/rgb2rgb.h" |
87 #include "../postproc/swscale.h" | 87 #include "postproc/swscale.h" |
88 #include "../cpudetect.h" | 88 #include "cpudetect.h" |
89 | 89 |
90 #define USE_LIBFAME | 90 #define USE_LIBFAME |
91 | 91 |
92 /* Libfame codec initialisation */ | 92 /* Libfame codec initialisation */ |
93 #ifdef USE_LIBFAME | 93 #ifdef USE_LIBFAME |
101 | 101 |
102 /* libavcodec codec initialisation */ | 102 /* libavcodec codec initialisation */ |
103 #ifdef USE_LIBAVCODEC | 103 #ifdef USE_LIBAVCODEC |
104 #ifdef USE_LIBAVCODEC_SO | 104 #ifdef USE_LIBAVCODEC_SO |
105 #include <libffmpeg/avcodec.h> | 105 #include <libffmpeg/avcodec.h> |
106 #include <libffmpeg/dsputil.h> | |
106 #else | 107 #else |
107 #include "libavcodec/avcodec.h" | 108 #include "libavcodec/avcodec.h" |
109 #include "libavcodec/dsputil.h" | |
108 #endif | 110 #endif |
109 /* for video encoder */ | 111 /* for video encoder */ |
110 static AVCodec *avc_codec = NULL; | 112 static AVCodec *avc_codec = NULL; |
111 static AVCodecContext *avc_context = NULL; | 113 static AVCodecContext *avc_context = NULL; |
112 static AVPicture avc_picture; | 114 static AVPicture avc_picture; |
113 int avc_outbuf_size = 100000; | 115 int avc_outbuf_size = 100000; |
116 extern int avcodec_inited; | |
114 #endif | 117 #endif |
115 | 118 |
116 char *picture_data[] = { NULL, NULL, NULL }; | 119 char *picture_data[] = { NULL, NULL, NULL }; |
117 int picture_linesize[] = { 0, 0, 0 }; | 120 int picture_linesize[] = { 0, 0, 0 }; |
118 | 121 |
677 return -1; | 680 return -1; |
678 } | 681 } |
679 } | 682 } |
680 | 683 |
681 #if defined(USE_LIBAVCODEC) | 684 #if defined(USE_LIBAVCODEC) |
682 if (mpeg_codec == MPG_CODEC_AVCODEC && !avc_context) { | 685 if (mpeg_codec == MPG_CODEC_AVCODEC && !avcodec_inited) { |
683 avcodec_init(); | 686 avcodec_init(); |
684 avcodec_register_all(); | 687 avcodec_register_all(); |
685 } | 688 avcodec_inited = 1; |
689 } | |
690 | |
686 #endif | 691 #endif |
687 | 692 |
688 return 0; | 693 return 0; |
689 } | 694 } |