rtpenc_aac: Merge a definition with a declaration
authorMartin Storsjö <martin@martin.st>
Wed, 25 Feb 2015 22:21:03 +0000 (00:21 +0200)
committerMartin Storsjö <martin@martin.st>
Sat, 28 Feb 2015 20:53:54 +0000 (22:53 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpenc_aac.c

index 7dcdec9..5c7d168 100644 (file)
 void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
 {
     RTPMuxContext *s = s1->priv_data;
-    int len, max_packet_size;
-    uint8_t *p;
     const int max_au_headers_size = 2 + 2 * s->max_frames_per_packet;
+    int len, max_packet_size = s->max_payload_size - max_au_headers_size;
+    uint8_t *p;
 
     /* skip ADTS header, if present */
     if ((s1->streams[0]->codec->extradata_size) == 0) {
         size -= 7;
         buff += 7;
     }
-    max_packet_size = s->max_payload_size - max_au_headers_size;
 
     /* test if the packet must be sent */
     len = (s->buf_ptr - s->buf);