May occur if trying to transmux from eg, MPEG2-TS to RTP.
---
Untested with anything beyond SDP generation.
libavformat/rtpenc.c | 4 ++++
libavformat/sdp.c | 6 ++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 7bc7373..b739fd0 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -56,6 +56,7 @@ static int is_supported(enum AVCodecID id)
case AV_CODEC_ID_MPEG2VIDEO:
case AV_CODEC_ID_MPEG4:
case AV_CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC_LATM:
case AV_CODEC_ID_MP2:
case AV_CODEC_ID_MP3:
case AV_CODEC_ID_PCM_ALAW:
@@ -543,6 +544,9 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket
*pkt)
else
ff_rtp_send_aac(s1, pkt->data, size);
break;
+ case AV_CODEC_ID_AAC_LATM:
+ ff_rtp_send_latm(s1, pkt->data, size);
+ break;
case AV_CODEC_ID_AMR_NB:
case AV_CODEC_ID_AMR_WB:
ff_rtp_send_amr(s1, pkt->data, size);
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index a690219..7ae08fd 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -438,8 +438,10 @@ static char *sdp_write_media_attributes(char *buff, int
size, AVCodecContext *c,
payload_type, config ? config : "");
break;
case AV_CODEC_ID_AAC:
- if (fmt && fmt->oformat->priv_class &&
- av_opt_flag_is_set(fmt->priv_data, "rtpflags", "latm")) {
+ case AV_CODEC_ID_AAC_LATM:
+ if ((fmt && fmt->oformat->priv_class &&
+ av_opt_flag_is_set(fmt->priv_data, "rtpflags", "latm")) ||
+ c->codec_id == AV_CODEC_ID_AAC_LATM) {
config = latm_context2config(c);
if (!config)
return NULL;
--
1.9.3 (Apple Git-50)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel