[MPlayer-cvslog] r34272 - trunk/libmpdemux/demux_audio.c

ib subversion at mplayerhq.hu
Thu Oct 27 21:58:42 CEST 2011


Author: ib
Date: Thu Oct 27 21:58:42 2011
New Revision: 34272

Log:
Ensure that demuxer->movi_end will be set.

This also simplifies the code that checks for TAG.

Modified:
   trunk/libmpdemux/demux_audio.c

Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c	Thu Oct 27 14:16:01 2011	(r34271)
+++ trunk/libmpdemux/demux_audio.c	Thu Oct 27 21:58:42 2011	(r34272)
@@ -332,6 +332,7 @@ static int demux_audio_open(demuxer_t* d
   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 @@ static int demux_audio_open(demuxer_t* d
       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;


More information about the MPlayer-cvslog mailing list