OLD | NEW |
1 /* | 1 /* |
2 * various utility functions for use within FFmpeg | 2 * various utility functions for use within FFmpeg |
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard | 3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard |
4 * | 4 * |
5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
6 * | 6 * |
7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 if ((ret = av_opt_set_dict(s->priv_data, &tmp)) < 0) | 588 if ((ret = av_opt_set_dict(s->priv_data, &tmp)) < 0) |
589 goto fail; | 589 goto fail; |
590 } | 590 } |
591 } | 591 } |
592 | 592 |
593 /* e.g. AVFMT_NOFILE formats will not have a AVIOContext */ | 593 /* e.g. AVFMT_NOFILE formats will not have a AVIOContext */ |
594 if (s->pb) | 594 if (s->pb) |
595 ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC); | 595 ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC); |
596 | 596 |
597 if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header) | 597 if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header) |
598 if ((ret = s->iformat->read_header(s)) < 0) | 598 if ((ret = s->iformat->read_header(s)) < 0) { |
| 599 s->iformat->read_close(s); |
599 goto fail; | 600 goto fail; |
| 601 } |
600 | 602 |
601 if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->pb && !s->data_offset) | 603 if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->pb && !s->data_offset) |
602 s->data_offset = avio_tell(s->pb); | 604 s->data_offset = avio_tell(s->pb); |
603 | 605 |
604 s->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE; | 606 s->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE; |
605 | 607 |
606 if (options) { | 608 if (options) { |
607 av_dict_free(options); | 609 av_dict_free(options); |
608 *options = tmp; | 610 *options = tmp; |
609 } | 611 } |
(...skipping 3594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4204 } | 4206 } |
4205 | 4207 |
4206 const struct AVCodecTag *avformat_get_riff_video_tags(void) | 4208 const struct AVCodecTag *avformat_get_riff_video_tags(void) |
4207 { | 4209 { |
4208 return ff_codec_bmp_tags; | 4210 return ff_codec_bmp_tags; |
4209 } | 4211 } |
4210 const struct AVCodecTag *avformat_get_riff_audio_tags(void) | 4212 const struct AVCodecTag *avformat_get_riff_audio_tags(void) |
4211 { | 4213 { |
4212 return ff_codec_wav_tags; | 4214 return ff_codec_wav_tags; |
4213 } | 4215 } |
OLD | NEW |