Some devices expect it this way.
---
Not sure if it worthy an option.
libavformat/rtpenc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index d330607..c501870 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -187,8 +187,11 @@ static int rtp_write_header(AVFormatContext *s1)
break;
case AV_CODEC_ID_H264:
/* check for H.264 MP4 syntax */
- if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
- s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
+ if (st->codec->extradata_size > 4) {
+ if (st->codec->extradata[0] == 1)
+ s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
+ ff_rtp_send_h264(s1, st->codec->extradata,
+ st->codec->extradata_size);
}
break;
case AV_CODEC_ID_VORBIS:
--
1.8.3.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel