check if the parser needs to be opened for stream i */
| 2113 | |
| 2114 | /* check if the parser needs to be opened for stream i */ |
| 2115 | static void open_parser(AVFormatContext *s, int i) |
| 2116 | { |
| 2117 | AVStream *st = s->streams[i]; |
| 2118 | AVCodec *codec; |
| 2119 | |
| 2120 | if (!st->codec->codec) { |
| 2121 | codec = avcodec_find_decoder(st->codec->codec_id); |
| 2122 | if (codec && (codec->capabilities & CODEC_CAP_PARSE_ONLY)) { |
| 2123 | st->codec->parse_only = 1; |
| 2124 | if (avcodec_open(st->codec, codec) < 0) |
| 2125 | st->codec->parse_only = 0; |
| 2126 | } |
| 2127 | } |
| 2128 | } |
| 2129 | |
| 2130 | static int open_input_stream(HTTPContext *c, const char *info) |
| 2131 | { |
no test coverage detected