summaryrefslogtreecommitdiffstats
path: root/aviheader.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-06 01:18:59 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-06 01:18:59 +0000
commitd9a5713e26f69230f3dc35a8d9136d2d583f7b7f (patch)
tree0b23fc29e4255baa3aa03b76c63c11caa95d89cc /aviheader.c
parentd81123c78b8d00d9a9534173ba69dc5c437f80d5 (diff)
downloadmpv-d9a5713e26f69230f3dc35a8d9136d2d583f7b7f.tar.bz2
mpv-d9a5713e26f69230f3dc35a8d9136d2d583f7b7f.tar.xz
sh_audio/sh_video added, general codec cleanup
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@292 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'aviheader.c')
-rw-r--r--aviheader.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/aviheader.c b/aviheader.c
index 9fd8c220c1..215fbc1bce 100644
--- a/aviheader.c
+++ b/aviheader.c
@@ -41,28 +41,28 @@ while(1){
AVIStreamHeader h;
stream_read(demuxer->stream,(char*) &h,MIN(size2,sizeof(h)));
chunksize-=MIN(size2,sizeof(h));
- if(h.fccType==streamtypeVIDEO) memcpy(&avi_header.video,&h,sizeof(h));else
- if(h.fccType==streamtypeAUDIO) memcpy(&avi_header.audio,&h,sizeof(h));
+ if(h.fccType==streamtypeVIDEO) memcpy(&sh_video_i.video,&h,sizeof(h));else
+ if(h.fccType==streamtypeAUDIO) memcpy(&sh_audio_i.audio,&h,sizeof(h));
last_fccType=h.fccType;
if(verbose>=1) print_strh(&h);
++stream_id;
break; }
case ckidSTREAMFORMAT: { // read 'strf'
if(last_fccType==streamtypeVIDEO){
- stream_read(demuxer->stream,(char*) &avi_header.bih,MIN(size2,sizeof(avi_header.bih)));
- chunksize-=MIN(size2,sizeof(avi_header.bih));
-// init_video_codec();
-// init_video_out();
+ sh_video_t *sh_video=&sh_video_i; // FIXME!
+ stream_read(demuxer->stream,(char*) &sh_video->bih,MIN(size2,sizeof(sh_video->bih)));
+ chunksize-=MIN(size2,sizeof(sh_video->bih));
+ sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
+ sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
if(demuxer->video->id==-1) demuxer->video->id=stream_id;
} else
if(last_fccType==streamtypeAUDIO){
+ sh_audio_t *sh_audio=&sh_audio_i; // FIXME!
int z=(chunksize<64)?chunksize:64;
if(verbose>=2) printf("found 'wf', %d bytes of %d\n",chunksize,sizeof(WAVEFORMATEX));
- stream_read(demuxer->stream,(char*) &avi_header.wf_ext,z);
+ stream_read(demuxer->stream,(char*) &sh_audio->wf,z);
chunksize-=z;
- if(verbose>=1) print_wave_header((WAVEFORMATEX*)&avi_header.wf_ext);
-// init_audio_codec();
-// init_audio_out();
+ if(verbose>=1) print_wave_header(&sh_audio->wf);
if(demuxer->audio->id==-1) demuxer->audio->id=stream_id;
}
break;