summaryrefslogtreecommitdiffstats
path: root/demux/demux_mf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-30 00:52:32 +0200
committerwm4 <wm4@nowhere>2013-04-30 00:52:32 +0200
commitea7b920184a865a3343001318fc4a32dcfc7b4f5 (patch)
treefbefd8539b77ee7473ad73740cc8ffa97bc4ffbe /demux/demux_mf.c
parent3dcc83a70609d392c8ecd917dd5c16995424e9c4 (diff)
parentd98e61ea438db66323734ad1b6bea66411a3c97b (diff)
downloadmpv-ea7b920184a865a3343001318fc4a32dcfc7b4f5.tar.bz2
mpv-ea7b920184a865a3343001318fc4a32dcfc7b4f5.tar.xz
Merge branch 'master' into low_quality_intel_crap
Conflicts: video/out/gl_video_shaders.glsl video/out/vo_opengl.c
Diffstat (limited to 'demux/demux_mf.c')
-rw-r--r--demux/demux_mf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/demux/demux_mf.c b/demux/demux_mf.c
index 236718de36..0db3fb8add 100644
--- a/demux/demux_mf.c
+++ b/demux/demux_mf.c
@@ -70,8 +70,11 @@ static int demux_mf_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds){
if (mf->streams)
entry_stream = mf->streams[mf->curr_frame];
struct stream *stream = entry_stream;
- if (!stream)
- stream = open_stream(mf->names[mf->curr_frame], demuxer->opts, NULL);
+ if (!stream) {
+ char *filename = mf->names[mf->curr_frame];
+ if (filename)
+ stream = open_stream(filename, demuxer->opts, NULL);
+ }
if (stream) {
stream_seek(stream, 0);
@@ -87,7 +90,7 @@ static int demux_mf_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds){
talloc_free(data.start);
}
- if (stream != entry_stream)
+ if (stream && stream != entry_stream)
free_stream(stream);
mf->curr_frame++;