changeset 34184:da679f8d2ac6

Ensure that demuxer->movi_end will be set. This also simplifies the code that checks for TAG.
author ib
date Thu, 27 Oct 2011 19:58:42 +0000
parents 3053e7ffd08d
children 05306b88b675
files libmpdemux/demux_audio.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;