annotate stream/stream_null.c @ 24350:eb7b1f3327aa

Add a check for c->head being NULL in pullup_free_context(). This fixes crashes when an invalid filter chain is built Patch by Alexander Strange % astrange A ithinksw P com % Original thread: date: Sep 7, 2007 8:47 PM subject: [MPlayer-dev-eng] [PATCH] crash in pullup with invalid filters
author gpoirier
date Sat, 08 Sep 2007 14:43:10 +0000
parents ab8d6b6deb63
children c1d17bd6683c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9901
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
1
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
2 #include "config.h"
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
3
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
4 #include <stdlib.h>
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
5 #include <string.h>
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
6
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
7 #include "stream.h"
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
8
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
9 static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
10 stream->type = STREAMTYPE_DUMMY;
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
11
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
12 return 1;
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
13 }
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
14
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
15
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
16 stream_info_t stream_info_null = {
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
17 "Null stream",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
18 "null",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
19 "Albeu",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
20 "",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
21 open_s,
19301
097e5bc71210 added dedicated file for mf:// input
ben
parents: 19273
diff changeset
22 { "null", NULL },
9901
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
23 NULL,
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
24 0 // Urls are an option string
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
25 };