aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-26 00:21:03 +0200
committerMartin Storsjö <martin@martin.st>2015-02-28 22:53:54 +0200
commit9c9b0218e85fcd969308632f75af48a4ce229541 (patch)
tree76f37339d95b3233e20307f5cbdde4105d5e0ae8
parent1fc64e2e07787bbca82a72c146588e850e6d098a (diff)
downloadffmpeg-9c9b0218e85fcd969308632f75af48a4ce229541.tar.gz
rtpenc_aac: Merge a definition with a declaration
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/rtpenc_aac.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/rtpenc_aac.c b/libavformat/rtpenc_aac.c
index 7dcdec9499..5c7d1689d3 100644
--- a/libavformat/rtpenc_aac.c
+++ b/libavformat/rtpenc_aac.c
@@ -25,16 +25,15 @@
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);