]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_xiph.c
Merge commit 'b9ba5253dd1232be4b48cfe61c31ff4b3de3d10a'
[ffmpeg] / libavformat / rtpdec_xiph.c
index d66b17af5ef61409446f44a891a976082a539fbd..eddb781ddb84e5cf48f46670035da306bae789c5 100644 (file)
@@ -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,