summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_xiph.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-21 14:00:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-21 14:02:01 +0100
commit0a5da9cc148b2ac7102b4a0653c38735672629f6 (patch)
treef20d33699f6f79a2daaaaa2513bb7fcc0f396a7e /libavformat/rtpdec_xiph.c
parent950482bf587889c507340ae5893a851be8e99fcc (diff)
parentc6f1dc8e4cd967ae056698eafb891a08003c211c (diff)
downloadffmpeg-0a5da9cc148b2ac7102b4a0653c38735672629f6.tar.gz
Merge commit 'c6f1dc8e4cd967ae056698eafb891a08003c211c'
* commit 'c6f1dc8e4cd967ae056698eafb891a08003c211c': rtpdec: Move setting the parsing flags to the actual depacketizers rtpdec: Split handling of mpeg12 audio/video to a separate depacketizer Conflicts: libavformat/rtpdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_xiph.c')
-rw-r--r--libavformat/rtpdec_xiph.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index d66b17af5e..eddb781ddb 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -69,6 +69,16 @@ static void xiph_free_context(PayloadContext * data)
av_free(data);
}
+static int xiph_vorbis_init(AVFormatContext *ctx, int st_index,
+ PayloadContext *data)
+{
+ if (st_index < 0)
+ return 0;
+ ctx->streams[st_index]->need_parsing = AVSTREAM_PARSE_HEADERS;
+ return 0;
+}
+
+
static int xiph_handle_packet(AVFormatContext *ctx, PayloadContext *data,
AVStream *st, AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, uint16_t seq,
@@ -391,6 +401,7 @@ RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
.enc_name = "vorbis",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_VORBIS,
+ .init = xiph_vorbis_init,
.parse_sdp_a_line = xiph_parse_sdp_line,
.alloc = xiph_new_context,
.free = xiph_free_context,