[MPlayer-dev-eng] i make mplayer.dll in MinGW, but failed when call demux_open.

李鑫 jackyxinli at gmail.com
Wed Aug 4 05:27:31 CEST 2010


Hi, all, I make mplayer.dll in MinGW, and I write my own test code. listed
below:
#include <stdio.h>
#include <stdlib.h>
#include "stream/stream.h"
#include "libmpdemux/demuxer.h"
#include "libmpdemux/stheader.h"
int main(int argc, char* argv[])
{
 stream_t* stream = NULL;
 demuxer_t* demuxer = NULL;
 char* filename = "d:\\Music\\01.mp3";
 int file_format = 0;
 sh_audio_t *sh_audio = NULL;
    sh_video_t *sh_video = NULL;
    demux_stream_t *d_audio = NULL;
    demux_stream_t *d_video = NULL;
 stream = open_stream(filename, 0, &file_format);
 demuxer = demux_open(stream, file_format, -1, -1, -1, filename);
 d_audio=demuxer->audio;
 d_video=demuxer->video;
 printf("stream=%p, demuxer=%p, d_audio=%p, d_video=%p\n",
  stream, demuxer, d_audio, d_video);
 system("pause");
 return 0;
}

when run program, the result of d_audio shown in screen always null, when i
trace into mplayer.exe, the result of d_audio is not null, why?
if someone know why, please tell me, thanks.

best regards,
jacky_zz


More information about the MPlayer-dev-eng mailing list