---
libavformat/rtpenc_h264_hevc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/rtpenc_h264_hevc.c b/libavformat/rtpenc_h264_hevc.c
index 9cfe0e2..9f329a6 100644
--- a/libavformat/rtpenc_h264_hevc.c
+++ b/libavformat/rtpenc_h264_hevc.c
@@ -40,7 +40,7 @@ static void flush_buffered(AVFormatContext *s1, int last)
// If we're only sending one single NAL unit, send it as such, skip
// the STAP-A/AP framing
if (s->buffered_nals == 1) {
- enum AVCodecID codec = s1->streams[0]->codec->codec_id;
+ enum AVCodecID codec = s1->streams[0]->codecpar->codec_id;
if (codec == AV_CODEC_ID_H264)
ff_rtp_send_data(s1, s->buf + 3, s->buf_ptr - s->buf - 3,
last);
else
@@ -55,7 +55,7 @@ static void flush_buffered(AVFormatContext *s1, int last)
static void nal_send(AVFormatContext *s1, const uint8_t *buf, int size, int
last)
{
RTPMuxContext *s = s1->priv_data;
- enum AVCodecID codec = s1->streams[0]->codec->codec_id;
+ enum AVCodecID codec = s1->streams[0]->codecpar->codec_id;
av_log(s1, AV_LOG_DEBUG, "Sending NAL %x of len %d M=%d\n", buf[0] & 0x1F,
size, last);
if (size <= s->max_payload_size) {
--
2.0.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel