~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/arch/win32/ffmpeglib.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2006-07-30 19:15:59 UTC
  • mto: (9.1.1 lenny) (1.1.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20060730191559-g31ymd2mk102kzff
Tags: upstream-1.19
ImportĀ upstreamĀ versionĀ 1.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include "gfxoutputdrv/ffmpeglib.h"
34
34
#include "log.h"
 
35
#include "res.h"
 
36
#include "translate.h"
 
37
#include "ui.h"
35
38
 
36
39
static HINSTANCE avcodec_dll = NULL;
37
40
static HINSTANCE avformat_dll = NULL;
54
57
    lib->p_avpicture_fill = NULL;
55
58
    lib->p_avpicture_get_size = NULL;
56
59
    lib->p_img_convert = NULL;
57
 
    lib->p___av_freep = NULL;
 
60
    lib->p_av_free = NULL;
58
61
 
59
62
    if (avformat_dll) {
60
63
        if (!FreeLibrary(avformat_dll)) {
97
100
 
98
101
static int ffmpeglib_load_library(ffmpeglib_t *lib)
99
102
{
 
103
        avcodec_version_t avcodec_version;
 
104
 
100
105
    if (!avcodec_dll) {
101
106
        avcodec_dll = LoadLibrary("avcodec.dll");
102
107
 
113
118
        GET_PROC_ADDRESS_AND_TEST_AVCODEC(avpicture_fill);
114
119
        GET_PROC_ADDRESS_AND_TEST_AVCODEC(avpicture_get_size);
115
120
        GET_PROC_ADDRESS_AND_TEST_AVCODEC(img_convert);
116
 
        GET_PROC_ADDRESS_AND_TEST_AVCODEC(__av_freep);
 
121
        GET_PROC_ADDRESS_AND_TEST_AVCODEC(av_free);
117
122
    }
118
123
 
119
124
    if (!avformat_dll) {
136
141
        GET_PROC_ADDRESS_AND_TEST_AVFORMAT(guess_format);
137
142
    }
138
143
 
 
144
        avcodec_version = (avcodec_version_t)GetProcAddress(avcodec_dll, "avcodec_version");
 
145
 
 
146
        if (avcodec_version() != LIBAVCODEC_VERSION_INT) {
 
147
                ui_error(translate_text(IDS_FFMPEG_DLL_MISMATCH));
 
148
                return -1;
 
149
        }
139
150
    return 0;
140
151
}
141
152