demux_audio: ensure that demuxer->movi_end will be set

This also simplifies the code that checks for TAG.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34272 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: ib
This commit is contained in:
mplayer-svn 2011-10-27 19:58:42 +00:00 committed by wm4
parent 1764bfacca
commit 273d1ddd71
1 changed files with 2 additions and 3 deletions

View File

@ -329,6 +329,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
case MP3:
sh_audio->format = (mp3_found->mpa_layer < 3 ? 0x50 : 0x55);
demuxer->movi_start = mp3_found->frame_pos;
demuxer->movi_end = s->end_pos;
next_frame_pos = mp3_found->next_frame_pos;
sh_audio->audio.dwSampleSize= 0;
sh_audio->audio.dwScale = mp3_found->mpa_spf;
@ -349,9 +350,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
stream_seek(s,s->end_pos-128);
stream_read(s,tag,3);
tag[3] = '\0';
if(strcmp(tag,"TAG"))
demuxer->movi_end = s->end_pos;
else {
if(!strcmp(tag,"TAG")) {
char buf[31];
uint8_t g;
demuxer->movi_end = stream_tell(s)-3;