aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_asf.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-04-06 16:58:48 +0300
committerMartin Storsjö <martin@martin.st>2012-04-07 01:01:08 +0300
commitd293e3464db647e72fffad50a678eca89546b65f (patch)
tree1e3669a27c24d857be7329586449bbac109369b1 /libavformat/rtpdec_asf.c
parent75b7feaeb488e8bfa8ce9ba9958c0c6fa704f2ad (diff)
downloadffmpeg-d293e3464db647e72fffad50a678eca89546b65f.tar.gz
rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
Searching for packet markers doesn't make sense for this use case, where packets are fed one at a time to the demuxer. This fixes playing back streams that have packets not starting with the 0x82, 0x00, 0x00 marker. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_asf.c')
-rw-r--r--libavformat/rtpdec_asf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 2dd367556d..c1690ef8f1 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -99,6 +99,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
if (av_strstart(p, "pgmpu:data:application/vnd.ms.wms-hdr.asfv1;base64,", &p)) {
AVIOContext pb;
RTSPState *rt = s->priv_data;
+ AVDictionary *opts = NULL;
int len = strlen(p) * 6 / 8;
char *buf = av_mallocz(len);
av_base64_decode(buf, p, len);
@@ -113,7 +114,9 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
if (!(rt->asf_ctx = avformat_alloc_context()))
return AVERROR(ENOMEM);
rt->asf_ctx->pb = &pb;
- ret = avformat_open_input(&rt->asf_ctx, "", &ff_asf_demuxer, NULL);
+ av_dict_set(&opts, "no_resync_search", "1", 0);
+ ret = avformat_open_input(&rt->asf_ctx, "", &ff_asf_demuxer, &opts);
+ av_dict_free(&opts);
if (ret < 0)
return ret;
av_dict_copy(&s->metadata, rt->asf_ctx->metadata, 0);