Showing the changes to libavformat (43 of 303 files). Show all
Unified · Split
| @@ -68,7 +68,7 @@ typedef struct AMVContext · 67 unmodified lines | |||
| 68 | 68 | ||
| 69 | /* | 69 | /* |
| 70 | * Cumulative PTS values for each stream, used for the final | 70 | * Cumulative PTS values for each stream, used for the final |
| 71 | * duration calculcation. | 71 | * duration calculation. |
| 72 | */ | 72 | */ |
| 73 | int64_t lastpts[AMV_STREAM_COUNT]; | 73 | int64_t lastpts[AMV_STREAM_COUNT]; |
| 74 | } AMVContext; | 74 | } AMVContext; |
| @@ -252,7 +252,7 @@ static int apm_write_header(AVFormatContext *s) · 251 unmodified lines | |||
| 252 | avio_wl16(s->pb, APM_TAG_CODEC); | 252 | avio_wl16(s->pb, APM_TAG_CODEC); |
| 253 | avio_wl16(s->pb, par->ch_layout.nb_channels); | 253 | avio_wl16(s->pb, par->ch_layout.nb_channels); |
| 254 | avio_wl32(s->pb, par->sample_rate); | 254 | avio_wl32(s->pb, par->sample_rate); |
| 255 | /* This is the wrong calculation, but it's what the orginal files have. */ | 255 | /* This is the wrong calculation, but it's what the original files have. */ |
| 256 | avio_wl32(s->pb, par->sample_rate * par->ch_layout.nb_channels * 2); | 256 | avio_wl32(s->pb, par->sample_rate * par->ch_layout.nb_channels * 2); |
| 257 | avio_wl16(s->pb, par->block_align); | 257 | avio_wl16(s->pb, par->block_align); |
| 258 | avio_wl16(s->pb, par->bits_per_coded_sample); | 258 | avio_wl16(s->pb, par->bits_per_coded_sample); |
| @@ -72,7 +72,7 @@ int ff_av1_filter_obus(AVIOContext *pb, const uint8_t *buf, int size); · 71 unmodified lines | |||
| 72 | * | 72 | * |
| 73 | * @return 0 in case of success, a negative AVERROR code in case of failure. | 73 | * @return 0 in case of success, a negative AVERROR code in case of failure. |
| 74 | * On failure, *out and *size are unchanged | 74 | * On failure, *out and *size are unchanged |
| 75 | * @note *out will be treated as unintialized on input and will not be freed. | 75 | * @note *out will be treated as uninitialized on input and will not be freed. |
| 76 | */ | 76 | */ |
| 77 | int ff_av1_filter_obus_buf(const uint8_t *in, uint8_t **out, | 77 | int ff_av1_filter_obus_buf(const uint8_t *in, uint8_t **out, |
| 78 | int *size, int *offset); | 78 | int *size, int *offset); |
| @@ -926,7 +926,7 @@ typedef struct AVStream { · 925 unmodified lines | |||
| 926 | * the sixth @ref AVStreamGroup.streams "stream" in the group is "512,512", | 926 | * the sixth @ref AVStreamGroup.streams "stream" in the group is "512,512", |
| 927 | * etc. | 927 | * etc. |
| 928 | * | 928 | * |
| 929 | * The following is an example of a canvas with overlaping tiles: | 929 | * The following is an example of a canvas with overlapping tiles: |
| 930 | * | 930 | * |
| 931 | * +-----------+ | 931 | * +-----------+ |
| 932 | * | %%%%% | | 932 | * | %%%%% | |
| @@ -1420,7 +1420,7 @@ typedef struct AVFormatContext { · 487 unmodified lines | |||
| 1420 | #define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input. | 1420 | #define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input. |
| 1421 | #define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS | 1421 | #define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS |
| 1422 | #define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container | 1422 | #define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container |
| 1423 | #define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled | 1423 | #define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the filling code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled |
| 1424 | #define AVFMT_FLAG_NOBUFFER 0x0040 ///< Do not buffer frames when possible | 1424 | #define AVFMT_FLAG_NOBUFFER 0x0040 ///< Do not buffer frames when possible |
| 1425 | #define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it. | 1425 | #define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it. |
| 1426 | #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted | 1426 | #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted |
| @@ -1670,7 +1670,7 @@ typedef struct AVFormatContext { · 243 unmodified lines | |||
| 1670 | int use_wallclock_as_timestamps; | 1670 | int use_wallclock_as_timestamps; |
| 1671 | 1671 | ||
| 1672 | /** | 1672 | /** |
| 1673 | * Skip duration calcuation in estimate_timings_from_pts. | 1673 | * Skip duration calculation in estimate_timings_from_pts. |
| 1674 | * - encoding: unused | 1674 | * - encoding: unused |
| 1675 | * - decoding: set by user | 1675 | * - decoding: set by user |
| 1676 | * | 1676 | * |
| @@ -1773,7 +1773,7 @@ typedef struct AVFormatContext { · 96 unmodified lines | |||
| 1773 | 1773 | ||
| 1774 | /** | 1774 | /** |
| 1775 | * IO repositioned flag. | 1775 | * IO repositioned flag. |
| 1776 | * This is set by avformat when the underlaying IO context read pointer | 1776 | * This is set by avformat when the underlying IO context read pointer |
| 1777 | * is repositioned, for example when doing byte based seeking. | 1777 | * is repositioned, for example when doing byte based seeking. |
| 1778 | * Demuxers can use the flag to detect such changes. | 1778 | * Demuxers can use the flag to detect such changes. |
| 1779 | */ | 1779 | */ |
| @@ -154,7 +154,7 @@ static int add_entry(URLContext *h, const unsigned char *buf, int size) · 153 unmodified lines | |||
| 154 | return 0; | 154 | return 0; |
| 155 | fail: | 155 | fail: |
| 156 | //we could truncate the file to pos here if pos >=0 but ftruncate isn't available in VS so | 156 | //we could truncate the file to pos here if pos >=0 but ftruncate isn't available in VS so |
| 157 | //for simplicty we just leave the file a bit larger | 157 | //for simplicity we just leave the file a bit larger |
| 158 | av_free(entry); | 158 | av_free(entry); |
| 159 | av_free(node); | 159 | av_free(node); |
| 160 | return ret; | 160 | return ret; |
| @@ -156,7 +156,7 @@ static int crypto_open2(URLContext *h, const char *uri, int flags, AVDictionary · 155 unmodified lines | |||
| 156 | if (ret < 0) | 156 | if (ret < 0) |
| 157 | goto err; | 157 | goto err; |
| 158 | 158 | ||
| 159 | // pass back information about the context we openned | 159 | // pass back information about the context we opened |
| 160 | if (c->hd->is_streamed) | 160 | if (c->hd->is_streamed) |
| 161 | h->is_streamed = c->hd->is_streamed; | 161 | h->is_streamed = c->hd->is_streamed; |
| 162 | } | 162 | } |
| @@ -171,7 +171,7 @@ static int crypto_open2(URLContext *h, const char *uri, int flags, AVDictionary · 8 unmodified lines | |||
| 171 | if (ret < 0) | 171 | if (ret < 0) |
| 172 | goto err; | 172 | goto err; |
| 173 | // for write, we must be streamed | 173 | // for write, we must be streamed |
| 174 | // - linear write only for crytpo aes-128-cbc | 174 | // - linear write only for crypto aes-128-cbc |
| 175 | h->is_streamed = 1; | 175 | h->is_streamed = 1; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| @@ -871,7 +871,7 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url, · 870 unmodified lines | |||
| 871 | type = get_content_type(adaptionset_node); | 871 | type = get_content_type(adaptionset_node); |
| 872 | if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO && | 872 | if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO && |
| 873 | type != AVMEDIA_TYPE_SUBTITLE) { | 873 | type != AVMEDIA_TYPE_SUBTITLE) { |
| 874 | av_log(s, AV_LOG_VERBOSE, "Parsing '%s' - skipp not supported representation type\n", url); | 874 | av_log(s, AV_LOG_VERBOSE, "Parsing '%s' - skip not supported representation type\n", url); |
| 875 | return 0; | 875 | return 0; |
| 876 | } | 876 | } |
| 877 | 877 | ||
| @@ -260,7 +260,7 @@ void ff_rfps_calculate(AVFormatContext *ic); · 259 unmodified lines | |||
| 260 | * belongs, from a timebase `tb_in` to a timebase `tb_out`. | 260 | * belongs, from a timebase `tb_in` to a timebase `tb_out`. |
| 261 | * | 261 | * |
| 262 | * The upper (lower) bound of the output interval is rounded up (down) such that | 262 | * The upper (lower) bound of the output interval is rounded up (down) such that |
| 263 | * the output interval always falls within the intput interval. The timestamp is | 263 | * the output interval always falls within the input interval. The timestamp is |
| 264 | * rounded to the nearest integer and halfway cases away from zero, and can | 264 | * rounded to the nearest integer and halfway cases away from zero, and can |
| 265 | * therefore fall outside of the output interval. | 265 | * therefore fall outside of the output interval. |
| 266 | * | 266 | * |
| @@ -160,7 +160,7 @@ static int get_audio_flags(AVFormatContext *s, AVCodecParameters *par) · 159 unmodified lines | |||
| 160 | } else { | 160 | } else { |
| 161 | switch (par->sample_rate) { | 161 | switch (par->sample_rate) { |
| 162 | case 48000: | 162 | case 48000: |
| 163 | // 48khz mp3 is stored with 44k1 samplerate identifer | 163 | // 48khz mp3 is stored with 44k1 samplerate identifier |
| 164 | if (par->codec_id == AV_CODEC_ID_MP3) { | 164 | if (par->codec_id == AV_CODEC_ID_MP3) { |
| 165 | flags |= FLV_SAMPLERATE_44100HZ; | 165 | flags |= FLV_SAMPLERATE_44100HZ; |
| 166 | break; | 166 | break; |
| @@ -805,7 +805,7 @@ static int64_t ftp_seek(URLContext *h, int64_t pos, int whence) · 804 unmodified lines | |||
| 805 | return AVERROR(EIO); | 805 | return AVERROR(EIO); |
| 806 | 806 | ||
| 807 | if (new_pos < 0) { | 807 | if (new_pos < 0) { |
| 808 | av_log(h, AV_LOG_ERROR, "Seeking to nagative position.\n"); | 808 | av_log(h, AV_LOG_ERROR, "Seeking to negative position.\n"); |
| 809 | return AVERROR(EINVAL); | 809 | return AVERROR(EINVAL); |
| 810 | } | 810 | } |
| 811 | 811 | ||
| @@ -103,7 +103,7 @@ int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, · 102 unmodified lines | |||
| 103 | * LHEVCDecoderConfigurationRecord) to the provided AVIOContext. | 103 | * LHEVCDecoderConfigurationRecord) to the provided AVIOContext. |
| 104 | * | 104 | * |
| 105 | * If the extradata is Annex B format, it gets converted to lhvC format before | 105 | * If the extradata is Annex B format, it gets converted to lhvC format before |
| 106 | * writing. Otherwise, hvcC formated extradata is expected, not lhvC. | 106 | * writing. Otherwise, hvcC formatted extradata is expected, not lhvC. |
| 107 | * | 107 | * |
| 108 | * @param pb address of the AVIOContext where the lhvC shall be written | 108 | * @param pb address of the AVIOContext where the lhvC shall be written |
| 109 | * @param data address of the buffer holding the data needed to write the lhvC | 109 | * @param data address of the buffer holding the data needed to write the lhvC |
| @@ -2726,7 +2726,7 @@ static int hls_read_seek(AVFormatContext *s, int stream_index, · 2725 unmodified lines | |||
| 2726 | if (pls->is_subtitle) | 2726 | if (pls->is_subtitle) |
| 2727 | avformat_close_input(&pls->ctx); | 2727 | avformat_close_input(&pls->ctx); |
| 2728 | 2728 | ||
| 2729 | /* Reset the init segment so it's re-fetched and served appropiately */ | 2729 | /* Reset the init segment so it's re-fetched and served appropriately */ |
| 2730 | pls->cur_init_section = NULL; | 2730 | pls->cur_init_section = NULL; |
| 2731 | 2731 | ||
| 2732 | pls->seek_timestamp = seek_timestamp; | 2732 | pls->seek_timestamp = seek_timestamp; |
| @@ -1338,7 +1338,7 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path, · 1337 unmodified lines | |||
| 1338 | } | 1338 | } |
| 1339 | } | 1339 | } |
| 1340 | 1340 | ||
| 1341 | // if no domain in the cookie assume it appied to this request | 1341 | // if no domain in the cookie assume it applied to this request |
| 1342 | if ((e = av_dict_get(cookie_params, "domain", NULL, 0)) && e->value) { | 1342 | if ((e = av_dict_get(cookie_params, "domain", NULL, 0)) && e->value) { |
| 1343 | // find the offset comparison is on the min domain (b.com, not a.b.com) | 1343 | // find the offset comparison is on the min domain (b.com, not a.b.com) |
| 1344 | int domain_offset = strlen(domain) - strlen(e->value); | 1344 | int domain_offset = strlen(domain) - strlen(e->value); |
| @@ -657,7 +657,7 @@ static int param_parse(void *s, IAMFContext *c, AVIOContext *pb, · 656 unmodified lines | |||
| 657 | 657 | ||
| 658 | if (param_definition) { | 658 | if (param_definition) { |
| 659 | if (param_definition->param_size != param_size || memcmp(param_definition->param, param, param_size)) { | 659 | if (param_definition->param_size != param_size || memcmp(param_definition->param, param, param_size)) { |
| 660 | av_log(s, AV_LOG_ERROR, "Incosistent parameters for parameter_id %u\n", parameter_id); | 660 | av_log(s, AV_LOG_ERROR, "Inconsistent parameters for parameter_id %u\n", parameter_id); |
| 661 | av_free(param); | 661 | av_free(param); |
| 662 | return AVERROR_INVALIDDATA; | 662 | return AVERROR_INVALIDDATA; |
| 663 | } | 663 | } |
| @@ -731,7 +731,7 @@ static int audio_element_obu(void *s, IAMFContext *c, AVIOContext *pb, int len) · 67 unmodified lines | |||
| 731 | 731 | ||
| 732 | codec_config = ff_iamf_get_codec_config(c, codec_config_id); | 732 | codec_config = ff_iamf_get_codec_config(c, codec_config_id); |
| 733 | if (!codec_config) { | 733 | if (!codec_config) { |
| 734 | av_log(s, AV_LOG_ERROR, "Non existant codec config id %d referenced in an audio element\n", codec_config_id); | 734 | av_log(s, AV_LOG_ERROR, "Non existent codec config id %d referenced in an audio element\n", codec_config_id); |
| 735 | ret = AVERROR_INVALIDDATA; | 735 | ret = AVERROR_INVALIDDATA; |
| 736 | goto fail; | 736 | goto fail; |
| 737 | } | 737 | } |
| @@ -132,7 +132,7 @@ static int parameter_block_obu(AVFormatContext *s, IAMFDemuxContext *c, · 131 unmodified lines | |||
| 132 | parameter_id = ffio_read_leb(pb); | 132 | parameter_id = ffio_read_leb(pb); |
| 133 | param_definition = ff_iamf_get_param_definition(&c->iamf, parameter_id); | 133 | param_definition = ff_iamf_get_param_definition(&c->iamf, parameter_id); |
| 134 | if (!param_definition) { | 134 | if (!param_definition) { |
| 135 | av_log(s, AV_LOG_VERBOSE, "Non existant parameter_id %d referenced in a parameter block. Ignoring\n", | 135 | av_log(s, AV_LOG_VERBOSE, "Non existent parameter_id %d referenced in a parameter block. Ignoring\n", |
| 136 | parameter_id); | 136 | parameter_id); |
| 137 | ret = 0; | 137 | ret = 0; |
| 138 | goto fail; | 138 | goto fail; |
| @@ -236,7 +236,7 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void · 235 unmodified lines | |||
| 236 | return AVERROR(EINVAL); | 236 | return AVERROR(EINVAL); |
| 237 | } | 237 | } |
| 238 | if (layer->ambisonics_mode >= AV_IAMF_AMBISONICS_MODE_PROJECTION) { | 238 | if (layer->ambisonics_mode >= AV_IAMF_AMBISONICS_MODE_PROJECTION) { |
| 239 | av_log(log_ctx, AV_LOG_ERROR, "Unsuported ambisonics mode %d\n", layer->ambisonics_mode); | 239 | av_log(log_ctx, AV_LOG_ERROR, "Unsupported ambisonics mode %d\n", layer->ambisonics_mode); |
| 240 | return AVERROR_PATCHWELCOME; | 240 | return AVERROR_PATCHWELCOME; |
| 241 | } | 241 | } |
| 242 | for (int i = 0; i < stg->nb_streams; i++) { | 242 | for (int i = 0; i < stg->nb_streams; i++) { |
| @@ -1012,7 +1012,7 @@ static void id3v2_parse(AVIOContext *pb, AVDictionary **metadata, · 1011 unmodified lines | |||
| 1012 | if (tcomp) { | 1012 | if (tcomp) { |
| 1013 | int err; | 1013 | int err; |
| 1014 | 1014 | ||
| 1015 | av_log(s, AV_LOG_DEBUG, "Compresssed frame %s tlen=%d dlen=%ld\n", tag, tlen, dlen); | 1015 | av_log(s, AV_LOG_DEBUG, "Compressed frame %s tlen=%d dlen=%ld\n", tag, tlen, dlen); |
| 1016 | 1016 | ||
| 1017 | if (tlen <= 0) | 1017 | if (tlen <= 0) |
| 1018 | goto seek; | 1018 | goto seek; |
| @@ -139,15 +139,15 @@ static int imf_uri_is_unix_abs_path(const char *string) · 138 unmodified lines | |||
| 139 | 139 | ||
| 140 | static int imf_uri_is_dos_abs_path(const char *string) | 140 | static int imf_uri_is_dos_abs_path(const char *string) |
| 141 | { | 141 | { |
| 142 | /* Absolute path case: `C:\path\to\somwhere` */ | 142 | /* Absolute path case: `C:\path\to\somewhere` */ |
| 143 | if (string[1] == ':' && string[2] == '\\') | 143 | if (string[1] == ':' && string[2] == '\\') |
| 144 | return 1; | 144 | return 1; |
| 145 | 145 | ||
| 146 | /* Absolute path case: `C:/path/to/somwhere` */ | 146 | /* Absolute path case: `C:/path/to/somewhere` */ |
| 147 | if (string[1] == ':' && string[2] == '/') | 147 | if (string[1] == ':' && string[2] == '/') |
| 148 | return 1; | 148 | return 1; |
| 149 | 149 | ||
| 150 | /* Network path case: `\\path\to\somwhere` */ | 150 | /* Network path case: `\\path\to\somewhere` */ |
| 151 | if (string[0] == '\\' && string[1] == '\\') | 151 | if (string[0] == '\\' && string[1] == '\\') |
| 152 | return 1; | 152 | return 1; |
| 153 | 153 | ||
| @@ -374,7 +374,7 @@ int ff_img_read_header(AVFormatContext *s1) · 373 unmodified lines | |||
| 374 | st->codecpar->codec_id = ff_guess_image2_codec(s->path); | 374 | st->codecpar->codec_id = ff_guess_image2_codec(s->path); |
| 375 | if (st->codecpar->codec_id == AV_CODEC_ID_LJPEG) | 375 | if (st->codecpar->codec_id == AV_CODEC_ID_LJPEG) |
| 376 | st->codecpar->codec_id = AV_CODEC_ID_MJPEG; | 376 | st->codecpar->codec_id = AV_CODEC_ID_MJPEG; |
| 377 | if (st->codecpar->codec_id == AV_CODEC_ID_ALIAS_PIX) // we cannot distingiush this from BRENDER_PIX | 377 | if (st->codecpar->codec_id == AV_CODEC_ID_ALIAS_PIX) // we cannot distinguish this from BRENDER_PIX |
| 378 | st->codecpar->codec_id = AV_CODEC_ID_NONE; | 378 | st->codecpar->codec_id = AV_CODEC_ID_NONE; |
| 379 | } | 379 | } |
| 380 | if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && | 380 | if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && |
| @@ -46,7 +46,7 @@ typedef struct IPFSGatewayContext { · 45 unmodified lines | |||
| 46 | } IPFSGatewayContext; | 46 | } IPFSGatewayContext; |
| 47 | 47 | ||
| 48 | // A best-effort way to find the IPFS gateway. | 48 | // A best-effort way to find the IPFS gateway. |
| 49 | // Only the most appropiate gateway is set. It's not actually requested | 49 | // Only the most appropriate gateway is set. It's not actually requested |
| 50 | // (http call) to prevent a potential slowdown in startup. A potential timeout | 50 | // (http call) to prevent a potential slowdown in startup. A potential timeout |
| 51 | // is handled by the HTTP protocol. | 51 | // is handled by the HTTP protocol. |
| 52 | static int populate_ipfs_gateway(URLContext *h) | 52 | static int populate_ipfs_gateway(URLContext *h) |
| @@ -171,7 +171,7 @@ static int populate_ipfs_gateway(URLContext *h) · 118 unmodified lines | |||
| 171 | goto err; | 171 | goto err; |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | // Replace first occurence of end of line with \0 | 174 | // Replace first occurrence of end of line with \0 |
| 175 | c->gateway_buffer[strcspn(c->gateway_buffer, "\r\n")] = 0; | 175 | c->gateway_buffer[strcspn(c->gateway_buffer, "\r\n")] = 0; |
| 176 | 176 | ||
| 177 | // If strlen finds anything longer then 0 characters then we have a | 177 | // If strlen finds anything longer then 0 characters then we have a |
| @@ -39,7 +39,7 @@ static int ircam_probe(const AVProbeData *p) · 38 unmodified lines | |||
| 39 | return 0; | 39 | return 0; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | static const struct endianess { | 42 | static const struct endianness { |
| 43 | uint32_t magic; | 43 | uint32_t magic; |
| 44 | int is_le; | 44 | int is_le; |
| 45 | } table[] = { | 45 | } table[] = { |
| @@ -272,7 +272,7 @@ static int64_t libssh_seek(URLContext *h, int64_t pos, int whence) · 271 unmodified lines | |||
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | if (newpos < 0) { | 274 | if (newpos < 0) { |
| 275 | av_log(h, AV_LOG_ERROR, "Seeking to nagative position.\n"); | 275 | av_log(h, AV_LOG_ERROR, "Seeking to negative position.\n"); |
| 276 | return AVERROR(EINVAL); | 276 | return AVERROR(EINVAL); |
| 277 | } | 277 | } |
| 278 | 278 | ||
| @@ -59,7 +59,7 @@ static int mpeg4video_probe(const AVProbeData *probe_packet) · 58 unmodified lines | |||
| 59 | res++; | 59 | res++; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | // res_main repesents the reserved codes within the "main" profile, they are | 62 | // res_main represents the reserved codes within the "main" profile, they are |
| 63 | // added to the reserved ones if it appears that this is a "main" profile | 63 | // added to the reserved ones if it appears that this is a "main" profile |
| 64 | // stream | 64 | // stream |
| 65 | if (res_main && 2*res_main < VOP) | 65 | if (res_main && 2*res_main < VOP) |
| @@ -85,7 +85,7 @@ · 84 unmodified lines | |||
| 85 | #define LEVEL_ENDED 3 /* return value of ebml_parse when the | 85 | #define LEVEL_ENDED 3 /* return value of ebml_parse when the |
| 86 | * syntax level used for parsing ended. */ | 86 | * syntax level used for parsing ended. */ |
| 87 | #define SKIP_THRESHOLD 1024 * 1024 /* In non-seekable mode, if more than SKIP_THRESHOLD | 87 | #define SKIP_THRESHOLD 1024 * 1024 /* In non-seekable mode, if more than SKIP_THRESHOLD |
| 88 | * of unkown, potentially damaged data is encountered, | 88 | * of unknown, potentially damaged data is encountered, |
| 89 | * it is considered an error. */ | 89 | * it is considered an error. */ |
| 90 | #define UNKNOWN_EQUIV 50 * 1024 /* An unknown element is considered equivalent | 90 | #define UNKNOWN_EQUIV 50 * 1024 /* An unknown element is considered equivalent |
| 91 | * to this many bytes of unknown data for the | 91 | * to this many bytes of unknown data for the |
| @@ -1418,7 +1418,7 @@ static int ebml_parse(MatroskaDemuxContext *matroska, · 1326 unmodified lines | |||
| 1418 | } | 1418 | } |
| 1419 | 1419 | ||
| 1420 | if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) { | 1420 | if (!(pb->seekable & AVIO_SEEKABLE_NORMAL)) { |
| 1421 | // Loosing sync will likely manifest itself as encountering unknown | 1421 | // Losing sync will likely manifest itself as encountering unknown |
| 1422 | // elements which are not reliably distinguishable from elements | 1422 | // elements which are not reliably distinguishable from elements |
| 1423 | // belonging to future extensions of the format. | 1423 | // belonging to future extensions of the format. |
| 1424 | // We use a heuristic to detect such situations: If the current | 1424 | // We use a heuristic to detect such situations: If the current |
| @@ -1436,7 +1436,7 @@ static int ebml_parse(MatroskaDemuxContext *matroska, · 11 unmodified lines | |||
| 1436 | // UNKNOWN_EQUIV of skipped bytes for the check. | 1436 | // UNKNOWN_EQUIV of skipped bytes for the check. |
| 1437 | // The whole check is only done for non-seekable output, because | 1437 | // The whole check is only done for non-seekable output, because |
| 1438 | // in this situation skipped data can't simply be rechecked later. | 1438 | // in this situation skipped data can't simply be rechecked later. |
| 1439 | // This is especially important when using unkown length elements | 1439 | // This is especially important when using unknown length elements |
| 1440 | // as the check for whether a child exceeds its containing master | 1440 | // as the check for whether a child exceeds its containing master |
| 1441 | // element is not effective in this situation. | 1441 | // element is not effective in this situation. |
| 1442 | if (update_pos) { | 1442 | if (update_pos) { |
| @@ -3950,7 +3950,7 @@ static int find_prev_closest_index(AVStream *st, · 3949 unmodified lines | |||
| 3950 | 3950 | ||
| 3951 | while (*index >= 0 && (*tts_index) >= 0 && (*tts_index) < tts_count) { | 3951 | while (*index >= 0 && (*tts_index) >= 0 && (*tts_index) < tts_count) { |
| 3952 | // Find a "key frame" with PTS <= timestamp_pts (So that we can decode B-frames correctly). | 3952 | // Find a "key frame" with PTS <= timestamp_pts (So that we can decode B-frames correctly). |
| 3953 | // No need to add dts_shift to the timestamp here becase timestamp_pts has already been | 3953 | // No need to add dts_shift to the timestamp here because timestamp_pts has already been |
| 3954 | // compensated by dts_shift above. | 3954 | // compensated by dts_shift above. |
| 3955 | if ((e_old[*index].timestamp + tts_data[*tts_index].offset) <= timestamp_pts && | 3955 | if ((e_old[*index].timestamp + tts_data[*tts_index].offset) <= timestamp_pts && |
| 3956 | (e_old[*index].flags & AVINDEX_KEYFRAME)) { | 3956 | (e_old[*index].flags & AVINDEX_KEYFRAME)) { |
| @@ -4448,7 +4448,7 @@ static void mov_fix_index(MOVContext *mov, AVStream *st) · 491 unmodified lines | |||
| 4448 | } | 4448 | } |
| 4449 | } | 4449 | } |
| 4450 | // If there are empty edits, then msc->min_corrected_pts might be positive | 4450 | // If there are empty edits, then msc->min_corrected_pts might be positive |
| 4451 | // intentionally. So we subtract the sum duration of emtpy edits here. | 4451 | // intentionally. So we subtract the sum duration of empty edits here. |
| 4452 | msc->min_corrected_pts -= empty_edits_sum_duration; | 4452 | msc->min_corrected_pts -= empty_edits_sum_duration; |
| 4453 | 4453 | ||
| 4454 | // If the minimum pts turns out to be greater than zero after fixing the index, then we subtract the | 4454 | // If the minimum pts turns out to be greater than zero after fixing the index, then we subtract the |
| @@ -8429,7 +8429,7 @@ static int mov_read_dops(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 3974 unmodified lines | |||
| 8429 | avio_read(pb, st->codecpar->extradata + 9, size - 9); | 8429 | avio_read(pb, st->codecpar->extradata + 9, size - 9); |
| 8430 | 8430 | ||
| 8431 | /* OpusSpecificBox is stored in big-endian, but OpusHead is | 8431 | /* OpusSpecificBox is stored in big-endian, but OpusHead is |
| 8432 | little-endian; aside from the preceeding magic and version they're | 8432 | little-endian; aside from the preceding magic and version they're |
| 8433 | otherwise currently identical. Data after output gain at offset 16 | 8433 | otherwise currently identical. Data after output gain at offset 16 |
| 8434 | doesn't need to be bytewapped. */ | 8434 | doesn't need to be bytewapped. */ |
| 8435 | pre_skip = AV_RB16A(st->codecpar->extradata + 10); | 8435 | pre_skip = AV_RB16A(st->codecpar->extradata + 10); |
| @@ -8531,7 +8531,7 @@ static int mov_read_lhvc(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 95 unmodified lines | |||
| 8531 | 8531 | ||
| 8532 | num_arrays = buf[5]; | 8532 | num_arrays = buf[5]; |
| 8533 | old_size = st->codecpar->extradata_size; | 8533 | old_size = st->codecpar->extradata_size; |
| 8534 | atom.size -= 8 /* account for mov_realloc_extradata offseting */ | 8534 | atom.size -= 8 /* account for mov_realloc_extradata offsetting */ |
| 8535 | + 6 /* lhvC bytes before the arrays*/; | 8535 | + 6 /* lhvC bytes before the arrays*/; |
| 8536 | 8536 | ||
| 8537 | ret = mov_realloc_extradata(st->codecpar, atom); | 8537 | ret = mov_realloc_extradata(st->codecpar, atom); |
| @@ -871,7 +871,7 @@ static int mov_write_dops_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra · 870 unmodified lines | |||
| 871 | return AVERROR_INVALIDDATA; | 871 | return AVERROR_INVALIDDATA; |
| 872 | } | 872 | } |
| 873 | /* extradata contains an Ogg OpusHead, other than byte-ordering and | 873 | /* extradata contains an Ogg OpusHead, other than byte-ordering and |
| 874 | OpusHead's preceeding magic/version, OpusSpecificBox is currently | 874 | OpusHead's preceding magic/version, OpusSpecificBox is currently |
| 875 | identical. */ | 875 | identical. */ |
| 876 | channels = AV_RB8(track->extradata[track->last_stsd_index] + 9); | 876 | channels = AV_RB8(track->extradata[track->last_stsd_index] + 9); |
| 877 | channel_map = AV_RB8(track->extradata[track->last_stsd_index] + 18); | 877 | channel_map = AV_RB8(track->extradata[track->last_stsd_index] + 18); |
| @@ -3229,7 +3229,7 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track) · 2351 unmodified lines | |||
| 3229 | if (roll_samples_remaining <= 0) | 3229 | if (roll_samples_remaining <= 0) |
| 3230 | break; | 3230 | break; |
| 3231 | } | 3231 | } |
| 3232 | /* We don't have enough preceeding samples to compute a valid | 3232 | /* We don't have enough preceding samples to compute a valid |
| 3233 | roll_distance here, so this sample can't be independently | 3233 | roll_distance here, so this sample can't be independently |
| 3234 | decoded. */ | 3234 | decoded. */ |
| 3235 | if (roll_samples_remaining > 0) | 3235 | if (roll_samples_remaining > 0) |
| @@ -7324,7 +7324,7 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) · 4088 unmodified lines | |||
| 7324 | /* | 7324 | /* |
| 7325 | * Subtitles require special handling. | 7325 | * Subtitles require special handling. |
| 7326 | * | 7326 | * |
| 7327 | * 1) For full complaince, every track must have a sample at | 7327 | * 1) For full compliance, every track must have a sample at |
| 7328 | * dts == 0, which is rarely true for subtitles. So, as soon | 7328 | * dts == 0, which is rarely true for subtitles. So, as soon |
| 7329 | * as we see any packet with dts > 0, write an empty subtitle | 7329 | * as we see any packet with dts > 0, write an empty subtitle |
| 7330 | * at dts == 0 for any subtitle track with no samples in it. | 7330 | * at dts == 0 for any subtitle track with no samples in it. |
| @@ -203,7 +203,7 @@ static const AVOption options[] = { · 202 unmodified lines | |||
| 203 | {.i64 = -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM }, | 203 | {.i64 = -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM }, |
| 204 | {"skip_unknown_pmt", "skip PMTs for programs not advertised in the PAT", offsetof(MpegTSContext, skip_unknown_pmt), AV_OPT_TYPE_BOOL, | 204 | {"skip_unknown_pmt", "skip PMTs for programs not advertised in the PAT", offsetof(MpegTSContext, skip_unknown_pmt), AV_OPT_TYPE_BOOL, |
| 205 | {.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, | 205 | {.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, |
| 206 | {"merge_pmt_versions", "re-use streams when PMT's version/pids change", offsetof(MpegTSContext, merge_pmt_versions), AV_OPT_TYPE_BOOL, | 206 | {"merge_pmt_versions", "reuse streams when PMT's version/pids change", offsetof(MpegTSContext, merge_pmt_versions), AV_OPT_TYPE_BOOL, |
| 207 | {.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, | 207 | {.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, |
| 208 | {"skip_changes", "skip changing / adding streams / programs", offsetof(MpegTSContext, skip_changes), AV_OPT_TYPE_BOOL, | 208 | {"skip_changes", "skip changing / adding streams / programs", offsetof(MpegTSContext, skip_changes), AV_OPT_TYPE_BOOL, |
| 209 | {.i64 = 0}, 0, 1, 0 }, | 209 | {.i64 = 0}, 0, 1, 0 }, |
| @@ -2273,7 +2273,7 @@ static AVStream *find_matching_stream(MpegTSContext *ts, int pid, unsigned int p · 2063 unmodified lines | |||
| 2273 | 2273 | ||
| 2274 | if (found) { | 2274 | if (found) { |
| 2275 | av_log(ts->stream, AV_LOG_VERBOSE, | 2275 | av_log(ts->stream, AV_LOG_VERBOSE, |
| 2276 | "re-using existing %s stream %d (pid=0x%x) for new pid=0x%x\n", | 2276 | "reusing existing %s stream %d (pid=0x%x) for new pid=0x%x\n", |
| 2277 | av_get_media_type_string(found->codecpar->codec_type), | 2277 | av_get_media_type_string(found->codecpar->codec_type), |
| 2278 | found->index, found->id, pid); | 2278 | found->index, found->id, pid); |
| 2279 | } | 2279 | } |
| @@ -90,7 +90,7 @@ · 89 unmodified lines | |||
| 90 | #define ONIT_TID 0x41 /* Network Information section - other network */ | 90 | #define ONIT_TID 0x41 /* Network Information section - other network */ |
| 91 | #define SDT_TID 0x42 /* Service Description section - actual TS */ | 91 | #define SDT_TID 0x42 /* Service Description section - actual TS */ |
| 92 | /* TID from 0x43 to 0x45 are reserved for future use */ | 92 | /* TID from 0x43 to 0x45 are reserved for future use */ |
| 93 | #define OSDT_TID 0x46 /* Service Descrition section - other TS */ | 93 | #define OSDT_TID 0x46 /* Service Description section - other TS */ |
| 94 | /* TID from 0x47 to 0x49 are reserved for future use */ | 94 | /* TID from 0x47 to 0x49 are reserved for future use */ |
| 95 | #define BAT_TID 0x4A /* Bouquet Association section */ | 95 | #define BAT_TID 0x4A /* Bouquet Association section */ |
| 96 | #define UNT_TID 0x4B /* Update Notification Table section */ | 96 | #define UNT_TID 0x4B /* Update Notification Table section */ |
| @@ -106,7 +106,7 @@ · 9 unmodified lines | |||
| 106 | #define RST_TID 0x71 /* Running Status section */ | 106 | #define RST_TID 0x71 /* Running Status section */ |
| 107 | #define ST_TID 0x72 /* Stuffing section */ | 107 | #define ST_TID 0x72 /* Stuffing section */ |
| 108 | #define TOT_TID 0x73 /* Time Offset section */ | 108 | #define TOT_TID 0x73 /* Time Offset section */ |
| 109 | #define AIT_TID 0x74 /* Application Inforamtion section */ | 109 | #define AIT_TID 0x74 /* Application Information section */ |
| 110 | #define CT_TID 0x75 /* Container section */ | 110 | #define CT_TID 0x75 /* Container section */ |
| 111 | #define RCT_TID 0x76 /* Related Content section */ | 111 | #define RCT_TID 0x76 /* Related Content section */ |
| 112 | #define CIT_TID 0x77 /* Content Identifier section */ | 112 | #define CIT_TID 0x77 /* Content Identifier section */ |
| @@ -47,7 +47,7 @@ typedef struct MvContext { · 46 unmodified lines | |||
| 47 | int aformat; ///< audio format | 47 | int aformat; ///< audio format |
| 48 | } MvContext; | 48 | } MvContext; |
| 49 | 49 | ||
| 50 | /* these magic numbers are defined in moviefile.h on Silicon Grahpics IRIX */ | 50 | /* these magic numbers are defined in moviefile.h on Silicon Graphics IRIX */ |
| 51 | #define MOVIE_SOUND 1 | 51 | #define MOVIE_SOUND 1 |
| 52 | #define MOVIE_SILENT 2 | 52 | #define MOVIE_SILENT 2 |
| 53 | 53 | ||
| @@ -955,7 +955,7 @@ static int mxf_add_metadata_set(MXFContext *mxf, MXFMetadataSet **metadata_set, · 954 unmodified lines | |||
| 955 | int ret; | 955 | int ret; |
| 956 | 956 | ||
| 957 | // Index Table is special because it might be added manually without | 957 | // Index Table is special because it might be added manually without |
| 958 | // partition and we iterate thorugh all instances of them. Also some files | 958 | // partition and we iterate through all instances of them. Also some files |
| 959 | // use the same Instance UID for different index tables... | 959 | // use the same Instance UID for different index tables... |
| 960 | if (type != IndexTableSegment) { | 960 | if (type != IndexTableSegment) { |
| 961 | for (int i = 0; i < mg->metadata_sets_count; i++) { | 961 | for (int i = 0; i < mg->metadata_sets_count; i++) { |
| @@ -1062,7 +1062,7 @@ static void mxf_write_structural_component(AVFormatContext *s, AVStream *st, MXF · 1061 unmodified lines | |||
| 1062 | AVIOContext *pb = s->pb; | 1062 | AVIOContext *pb = s->pb; |
| 1063 | 1063 | ||
| 1064 | mxf_write_metadata_key(pb, 0x011100); | 1064 | mxf_write_metadata_key(pb, 0x011100); |
| 1065 | PRINT_KEY(s, "sturctural component key", pb->buf_ptr - 16); | 1065 | PRINT_KEY(s, "structural component key", pb->buf_ptr - 16); |
| 1066 | klv_encode_ber_length(pb, 108); | 1066 | klv_encode_ber_length(pb, 108); |
| 1067 | 1067 | ||
| 1068 | // write uid | 1068 | // write uid |
| @@ -72,7 +72,7 @@ · 71 unmodified lines | |||
| 72 | * so the header seems to not be mandatory. (for streaming). | 72 | * so the header seems to not be mandatory. (for streaming). |
| 73 | * | 73 | * |
| 74 | * index slice duration check (excepts nsvtrailer.nsv): | 74 | * index slice duration check (excepts nsvtrailer.nsv): |
| 75 | * for f in [^n]*.nsv; do DUR="$(ffmpeg -i "$f" 2>/dev/null | grep 'NSVf duration' | cut -d ' ' -f 4)"; IC="$(ffmpeg -i "$f" 2>/dev/null | grep 'INDEX ENTRIES' | cut -d ' ' -f 2)"; echo "duration $DUR, slite time $(($DUR/$IC))"; done | 75 | * for f in [^n]*.nsv; do DUR="$(ffmpeg -i "$f" 2>/dev/null | grep 'NSVf duration' | cut -d ' ' -f 4)"; IC="$(ffmpeg -i "$f" 2>/dev/null | grep 'INDEX ENTRIES' | cut -d ' ' -f 2)"; echo "duration $DUR, slice time $(($DUR/$IC))"; done |
| 76 | */ | 76 | */ |
| 77 | 77 | ||
| 78 | /* | 78 | /* |
| @@ -43,7 +43,7 @@ struct ogg_codec { · 42 unmodified lines | |||
| 43 | * @return < 0 (AVERROR) code or -1 on error | 43 | * @return < 0 (AVERROR) code or -1 on error |
| 44 | * == 0 if the packet was a regular data packet. | 44 | * == 0 if the packet was a regular data packet. |
| 45 | * == 1 if the packet was a header from a chained bitstream. | 45 | * == 1 if the packet was a header from a chained bitstream. |
| 46 | * This will cause the packet to be skiped in calling code (ogg_packet() | 46 | * This will cause the packet to be skipped in calling code (ogg_packet() |
| 47 | */ | 47 | */ |
| 48 | int (*packet)(AVFormatContext *, int); | 48 | int (*packet)(AVFormatContext *, int); |
| 49 | /** | 49 | /** |
| @@ -141,7 +141,7 @@ extern const struct ogg_codec ff_vp8_codec; · 91 unmodified lines | |||
| 141 | /** | 141 | /** |
| 142 | * Parse Vorbis comments | 142 | * Parse Vorbis comments |
| 143 | * | 143 | * |
| 144 | * @note The buffer will be temporarily modifed by this function, | 144 | * @note The buffer will be temporarily modified by this function, |
| 145 | * so it needs to be writable. Furthermore it must be padded | 145 | * so it needs to be writable. Furthermore it must be padded |
| 146 | * by a single byte (not counted in size). | 146 | * by a single byte (not counted in size). |
| 147 | * All changes will have been reverted upon return. | 147 | * All changes will have been reverted upon return. |
| @@ -152,7 +152,7 @@ int ff_vorbis_comment(AVFormatContext *ms, AVDictionary **m, · 4 unmodified lines | |||
| 152 | /** | 152 | /** |
| 153 | * Parse Vorbis comments and add metadata to an AVStream | 153 | * Parse Vorbis comments and add metadata to an AVStream |
| 154 | * | 154 | * |
| 155 | * @note The buffer will be temporarily modifed by this function, | 155 | * @note The buffer will be temporarily modified by this function, |
| 156 | * so it needs to be writable. Furthermore it must be padded | 156 | * so it needs to be writable. Furthermore it must be padded |
| 157 | * by a single byte (not counted in size). | 157 | * by a single byte (not counted in size). |
| 158 | * All changes will have been reverted upon return. | 158 | * All changes will have been reverted upon return. |
| @@ -52,7 +52,7 @@ typedef struct SCDOffsetTable { · 51 unmodified lines | |||
| 52 | 52 | ||
| 53 | typedef struct SCDHeader { | 53 | typedef struct SCDHeader { |
| 54 | uint64_t magic; /* SEDBSSCF */ | 54 | uint64_t magic; /* SEDBSSCF */ |
| 55 | uint32_t version; /* Verison number. We only know about 3. */ | 55 | uint32_t version; /* Version number. We only know about 3. */ |
| 56 | uint16_t unk1; /* Unknown, 260 in Drakengard 3, 1024 in FFXIV. */ | 56 | uint16_t unk1; /* Unknown, 260 in Drakengard 3, 1024 in FFXIV. */ |
| 57 | uint16_t header_size; /* Total size of this header. */ | 57 | uint16_t header_size; /* Total size of this header. */ |
| 58 | uint32_t file_size; /* Is often 0, just ignore it. */ | 58 | uint32_t file_size; /* Is often 0, just ignore it. */ |
| @@ -72,7 +72,7 @@ typedef struct SegmentContext { · 71 unmodified lines | |||
| 72 | const AVClass *class; /**< Class for private options. */ | 72 | const AVClass *class; /**< Class for private options. */ |
| 73 | int segment_idx; ///< index of the segment file to write, starting from 0 | 73 | int segment_idx; ///< index of the segment file to write, starting from 0 |
| 74 | int segment_idx_wrap; ///< number after which the index wraps | 74 | int segment_idx_wrap; ///< number after which the index wraps |
| 75 | int segment_idx_wrap_nb; ///< number of time the index has wraped | 75 | int segment_idx_wrap_nb; ///< number of time the index has wrapped |
| 76 | int segment_count; ///< number of segment files already written | 76 | int segment_count; ///< number of segment files already written |
| 77 | const AVOutputFormat *oformat; | 77 | const AVOutputFormat *oformat; |
| 78 | AVFormatContext *avf; | 78 | AVFormatContext *avf; |
| @@ -100,11 +100,11 @@ typedef struct SegmentContext { · 21 unmodified lines | |||
| 100 | 100 | ||
| 101 | char *times_str; ///< segment times specification string | 101 | char *times_str; ///< segment times specification string |
| 102 | int64_t *times; ///< list of segment interval specification | 102 | int64_t *times; ///< list of segment interval specification |
| 103 | int nb_times; ///< number of elments in the times array | 103 | int nb_times; ///< number of elements in the times array |
| 104 | 104 | ||
| 105 | char *frames_str; ///< segment frame numbers specification string | 105 | char *frames_str; ///< segment frame numbers specification string |
| 106 | int *frames; ///< list of frame number specification | 106 | int *frames; ///< list of frame number specification |
| 107 | int nb_frames; ///< number of elments in the frames array | 107 | int nb_frames; ///< number of elements in the frames array |
| 108 | int frame_count; ///< total number of reference frames | 108 | int frame_count; ///< total number of reference frames |
| 109 | int segment_frame_count; ///< number of reference frames in the segment | 109 | int segment_frame_count; ///< number of reference frames in the segment |
| 110 | 110 | ||
| @@ -199,8 +199,8 @@ static int srt_read_header(AVFormatContext *s) · 198 unmodified lines | |||
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | /* Append the last event. Here we force the cache to be flushed, because a | 201 | /* Append the last event. Here we force the cache to be flushed, because a |
| 202 | * trailing number is more likely to be geniune (for example a copyright | 202 | * trailing number is more likely to be genuine (for example a copyright |
| 203 | * date) and not the event index of an inexistant event */ | 203 | * date) and not the event index of an inexistent event */ |
| 204 | if (has_event_info) { | 204 | if (has_event_info) { |
| 205 | res = add_event(&srt->q, &buf, line_cache, &ei, 1); | 205 | res = add_event(&srt->q, &buf, line_cache, &ei, 1); |
| 206 | if (res < 0) | 206 | if (res < 0) |
| @@ -878,7 +878,7 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary ** · 877 unmodified lines | |||
| 878 | } | 878 | } |
| 879 | } | 879 | } |
| 880 | 880 | ||
| 881 | /* This seems to be neccesary despite explicitly setting client/server method above. */ | 881 | /* This seems to be necessary despite explicitly setting client/server method above. */ |
| 882 | if (c->listen) | 882 | if (c->listen) |
| 883 | SSL_set_accept_state(p->ssl); | 883 | SSL_set_accept_state(p->ssl); |
| 884 | else | 884 | else |
| @@ -1429,7 +1429,7 @@ static int tls_write(URLContext *h, const uint8_t *buf, int len) · 1428 unmodified lines | |||
| 1429 | 1429 | ||
| 1430 | ret = tls_process_send_buffer(h); | 1430 | ret = tls_process_send_buffer(h); |
| 1431 | if (ret == AVERROR(EAGAIN)) { | 1431 | if (ret == AVERROR(EAGAIN)) { |
| 1432 | /* We always need to signal that we consumed all (encryped) data since schannel must not | 1432 | /* We always need to signal that we consumed all (encrypted) data since schannel must not |
| 1433 | be fed the same data again. Sending will then be completed next call to this function, | 1433 | be fed the same data again. Sending will then be completed next call to this function, |
| 1434 | and EAGAIN returned until all remaining buffer is sent. */ | 1434 | and EAGAIN returned until all remaining buffer is sent. */ |
| 1435 | return outbuf[1].cbBuffer; | 1435 | return outbuf[1].cbBuffer; |
| @@ -71,7 +71,7 @@ static int tta_write_header(AVFormatContext *s) · 70 unmodified lines | |||
| 71 | if ((ret = avio_open_dyn_buf(&tta->seek_table)) < 0) | 71 | if ((ret = avio_open_dyn_buf(&tta->seek_table)) < 0) |
| 72 | return ret; | 72 | return ret; |
| 73 | 73 | ||
| 74 | /* Ignore most extradata information if present. It can be innacurate | 74 | /* Ignore most extradata information if present. It can be inaccurate |
| 75 | if for example remuxing from Matroska */ | 75 | if for example remuxing from Matroska */ |
| 76 | ffio_init_checksum(s->pb, ff_crcEDB88320_update, UINT32_MAX); | 76 | ffio_init_checksum(s->pb, ff_crcEDB88320_update, UINT32_MAX); |
| 77 | ffio_init_checksum(tta->seek_table, ff_crcEDB88320_update, UINT32_MAX); | 77 | ffio_init_checksum(tta->seek_table, ff_crcEDB88320_update, UINT32_MAX); |
| @@ -545,7 +545,7 @@ static void *circular_buffer_task_rx( void *_URLContext) · 544 unmodified lines | |||
| 545 | 545 | ||
| 546 | pthread_mutex_unlock(&s->mutex); | 546 | pthread_mutex_unlock(&s->mutex); |
| 547 | /* Blocking operations are always cancellation points; | 547 | /* Blocking operations are always cancellation points; |
| 548 | see "General Information" / "Thread Cancelation Overview" | 548 | see "General Information" / "Thread Cancellation Overview" |
| 549 | in Single Unix. */ | 549 | in Single Unix. */ |
| 550 | pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancelstate); | 550 | pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancelstate); |
| 551 | pkt_header.pkt_size = recvfrom(s->udp_fd, s->tmp + sizeof(pkt_header), sizeof(s->tmp) - sizeof(pkt_header), 0, (struct sockaddr *)&pkt_header.addr, &pkt_header.addr_len); | 551 | pkt_header.pkt_size = recvfrom(s->udp_fd, s->tmp + sizeof(pkt_header), sizeof(s->tmp) - sizeof(pkt_header), 0, (struct sockaddr *)&pkt_header.addr, &pkt_header.addr_len); |
| @@ -252,7 +252,7 @@ static int peak_write_chunk(AVFormatContext *s) · 251 unmodified lines | |||
| 252 | WAVMuxContext *wav = s->priv_data; | 252 | WAVMuxContext *wav = s->priv_data; |
| 253 | AVIOContext *pb = s->pb; | 253 | AVIOContext *pb = s->pb; |
| 254 | AVCodecParameters *par = s->streams[0]->codecpar; | 254 | AVCodecParameters *par = s->streams[0]->codecpar; |
| 255 | int64_t peak = ff_start_tag(s->pb, "levl"); | 255 | int64_t peak = ff_start_tag(s->pb, "levl"); // codespell:ignore |
| 256 | int64_t now0; | 256 | int64_t now0; |
| 257 | time_t now_secs; | 257 | time_t now_secs; |
| 258 | char timestamp[28]; | 258 | char timestamp[28]; |
| @@ -258,7 +258,7 @@ typedef struct WHIPContext { · 257 unmodified lines | |||
| 258 | int64_t whip_dtls_time; | 258 | int64_t whip_dtls_time; |
| 259 | int64_t whip_srtp_time; | 259 | int64_t whip_srtp_time; |
| 260 | 260 | ||
| 261 | /* The certificate and private key content used for DTLS hanshake */ | 261 | /* The certificate and private key content used for DTLS handshake */ |
| 262 | char cert_buf[MAX_CERTIFICATE_SIZE]; | 262 | char cert_buf[MAX_CERTIFICATE_SIZE]; |
| 263 | char key_buf[MAX_CERTIFICATE_SIZE]; | 263 | char key_buf[MAX_CERTIFICATE_SIZE]; |
| 264 | /* The fingerprint of certificate, used in SDP offer. */ | 264 | /* The fingerprint of certificate, used in SDP offer. */ |
| @@ -575,7 +575,7 @@ static int write_root_table(AVFormatContext *s, int64_t sector_pos) · 574 unmodified lines | |||
| 575 | } | 575 | } |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | // caculate root table size | 578 | // calculate root table size |
| 579 | size = avio_tell(pb) - sector_pos; | 579 | size = avio_tell(pb) - sector_pos; |
| 580 | pad = WTV_SECTOR_SIZE- size; | 580 | pad = WTV_SECTOR_SIZE- size; |
| 581 | write_pad(pb, pad); | 581 | write_pad(pb, pad); |