rtpenc_aac: Set a default value for max_frames_per_packet at init

This avoids having to conditionally set the default within the
packetizer function.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2015-02-25 23:34:36 +02:00
parent 12b3459979
commit 0662440b99
2 changed files with 4 additions and 3 deletions

View File

@@ -271,6 +271,8 @@ static int rtp_write_header(AVFormatContext *s1)
goto defaultcase;
case AV_CODEC_ID_AAC:
s->num_frames = 0;
if (!s->max_frames_per_packet)
s->max_frames_per_packet = 5;
goto defaultcase;
default:
defaultcase: