On Sat, Sep 07, 2019 at 07:23:13PM +0900, Hyun Yoo wrote: > From: Hyun Yoo <easethewo...@gmail.com> > > rtsp_st->sdp_payload_type is the first codec in 'm=' tag > st->codecpar->id is the first supported codec in 'a=' tag > the two is not guaranteed to be same for example when > 1) the order between attributes is random(rfc4566 doesn't force it) > 2) the first codec is same for 'm=' and 'a=' but it is unsupported codec > then st->codecpar->id will be the next one in 'a='(if it's supported) > > Signed-off-by: EaseTheWorld <easethewo...@gmail.com> > --- > libavformat/rtsp.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c > index c153cac88b..be3002690e 100644 > --- a/libavformat/rtsp.c > +++ b/libavformat/rtsp.c > @@ -569,6 +569,9 @@ static void sdp_parse_line(AVFormatContext *s, > SDPParseState *s1, > get_word(buf1, sizeof(buf1), &p); > payload_type = atoi(buf1); > rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1]; > + // parse only sdp_payload_type specified in 'm=' tag > + if (rtsp_st->sdp_payload_type != payload_type) > + return; > if (rtsp_st->stream_index >= 0) { > st = s->streams[rtsp_st->stream_index]; > sdp_parse_rtpmap(s, st, rtsp_st, payload_type, p); > @@ -582,6 +585,10 @@ static void sdp_parse_line(AVFormatContext *s, > SDPParseState *s1,
Applying: rtsp: fix wrong codec setup for some sdp error: corrupt patch at line 10 there are extra newlines in the patch ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you fake or manipulate statistics in a paper in physics you will never get a job again. If you fake or manipulate statistics in a paper in medicin you will get a job for life at the pharma industry.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".