# HG changeset patch # User ib # Date 1319745522 0 # Node ID da679f8d2ac68ee58e4650d1f5ed38431eb78b46 # Parent 3053e7ffd08d7792b25f52a4706cea7ba74197d8 Ensure that demuxer->movi_end will be set. This also simplifies the code that checks for TAG. diff -r 3053e7ffd08d -r da679f8d2ac6 libmpdemux/demux_audio.c --- a/libmpdemux/demux_audio.c Thu Oct 27 12:16:01 2011 +0000 +++ b/libmpdemux/demux_audio.c Thu Oct 27 19:58:42 2011 +0000 @@ -332,6 +332,7 @@ 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; @@ -352,9 +353,7 @@ 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;