changeset 22519:5f3a0a712afb

cosmetics: renamed variable amr as headersize, more meaningful; patch by Carl Eugen Hoyos
author nicodvb
date Mon, 12 Mar 2007 22:13:48 +0000
parents 29a3bb75db47
children e227eb76450d
files libmpdemux/demux_rtp.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rtp.cpp	Mon Mar 12 21:45:51 2007 +0000
+++ b/libmpdemux/demux_rtp.cpp	Mon Mar 12 22:13:48 2007 +0000
@@ -436,13 +436,13 @@
   //  the demuxer's 'priv' field)
   RTPState* rtpState = (RTPState*)(demuxer->priv);
   ReadBufferQueue* bufferQueue = NULL;
-  int amr = 0;
+  int headersize = 0;
   if (ds == demuxer->video) {
     bufferQueue = rtpState->videoBufferQueue;
   } else if (ds == demuxer->audio) {
     bufferQueue = rtpState->audioBufferQueue;
     if (bufferQueue->readSource()->isAMRAudioSource())
-      amr = 1;
+      headersize = 1;
   } else {
     fprintf(stderr, "(demux_rtp)getBuffer: internal error: unknown stream\n");
     return NULL;
@@ -470,7 +470,7 @@
 
   // Schedule the read operation:
   bufferQueue->blockingFlag = 0;
-  bufferQueue->readSource()->getNextFrame(&dp->buffer[amr], MAX_RTP_FRAME_SIZE - amr,
+  bufferQueue->readSource()->getNextFrame(&dp->buffer[headersize], MAX_RTP_FRAME_SIZE - headersize,
 					  afterReading, bufferQueue,
 					  onSourceClosure, bufferQueue);
   // Block ourselves until data becomes available:
@@ -478,7 +478,7 @@
     = bufferQueue->readSource()->envir().taskScheduler();
   scheduler.doEventLoop(&bufferQueue->blockingFlag);
 
-  if (amr)
+  if (headersize == 1) // amr
     dp->buffer[0] =
         ((AMRAudioSource*)bufferQueue->readSource())->lastFrameHeader();