diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2012-11-11 20:44:28 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-11-14 20:38:51 +0100 |
commit | 8034130e06b03859af9ce64f7ee653cd14df328d (patch) | |
tree | ac5d06c32f27347f96c147599f2e6129178c6e1e /libavformat/rtp.h | |
parent | 3b4296f41473a5b39e84d7a49d480624c9c60040 (diff) | |
download | ffmpeg-8034130e06b03859af9ce64f7ee653cd14df328d.tar.gz |
rtp: set the payload type as stream id
Support multiple video/audio streams with different format in the
same session.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/rtp.h')
-rw-r--r-- | libavformat/rtp.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/rtp.h b/libavformat/rtp.h index 6df4ed4f19..f8d406ea88 100644 --- a/libavformat/rtp.h +++ b/libavformat/rtp.h @@ -25,13 +25,18 @@ #include "libavcodec/avcodec.h" /** - * Return the payload type for a given codec used in the given format context. + * Return the payload type for a given stream used in the given format context. + * Static payload types are derived from the codec. + * Dynamic payload type are derived from the id field in AVStream. + * The format context private option payload_type overrides both. * * @param fmt The context of the format * @param codec The context of the codec + * @param idx The stream index * @return The payload type (the 'PT' field in the RTP header). */ -int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec); +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec, + int idx); /** * Initialize a codec context based on the payload type. |