Signed-off-by: Michael Niedermayer <michaelni@gmx.at>tags/n2.0
| @@ -3625,7 +3625,7 @@ Default value is @var{auto}. | |||||
| @item mode | @item mode | ||||
| Set the matching mode or strategy to use. @option{pc} mode is the safest in the | Set the matching mode or strategy to use. @option{pc} mode is the safest in the | ||||
| sense that it wont risk creating jerkiness due to duplicate frames when | |||||
| sense that it won't risk creating jerkiness due to duplicate frames when | |||||
| possible, but if there are bad edits or blended fields it will end up | possible, but if there are bad edits or blended fields it will end up | ||||
| outputting combed frames when a good match might actually exist. On the other | outputting combed frames when a good match might actually exist. On the other | ||||
| hand, @option{pcn_ub} mode is the most risky in terms of creating jerkiness, | hand, @option{pcn_ub} mode is the most risky in terms of creating jerkiness, | ||||
| @@ -244,7 +244,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, | |||||
| // OS/2 bitmap, 3 bytes per palette entry | // OS/2 bitmap, 3 bytes per palette entry | ||||
| if ((hsize-ihsize-14) < (colors << 2)) { | if ((hsize-ihsize-14) < (colors << 2)) { | ||||
| if ((hsize-ihsize-14) < colors * 3) { | if ((hsize-ihsize-14) < colors * 3) { | ||||
| av_log(avctx, AV_LOG_ERROR, "palette doesnt fit in packet\n"); | |||||
| av_log(avctx, AV_LOG_ERROR, "palette doesn't fit in packet\n"); | |||||
| return AVERROR_INVALIDDATA; | return AVERROR_INVALIDDATA; | ||||
| } | } | ||||
| for (i = 0; i < colors; i++) | for (i = 0; i < colors; i++) | ||||
| @@ -148,7 +148,7 @@ static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, | |||||
| loss |= FF_LOSS_RESOLUTION; | loss |= FF_LOSS_RESOLUTION; | ||||
| score -= 256 << dst_desc->log2_chroma_h; | score -= 256 << dst_desc->log2_chroma_h; | ||||
| } | } | ||||
| // dont favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side | |||||
| // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side | |||||
| if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 && | if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 && | ||||
| dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) { | dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) { | ||||
| score += 512; | score += 512; | ||||
| @@ -42,7 +42,7 @@ static int probe(AVProbeData *p) | |||||
| (AV_RL32(&p->buf[16]) != 16)) | (AV_RL32(&p->buf[16]) != 16)) | ||||
| return 0; | return 0; | ||||
| //We cant be sure that this is ACT and not regular WAV | |||||
| //We can't be sure that this is ACT and not regular WAV | |||||
| if (p->buf_size<512) | if (p->buf_size<512) | ||||
| return 0; | return 0; | ||||
| @@ -218,7 +218,7 @@ static int parse_playlist(HLSContext *c, const char *url, | |||||
| if (!in) { | if (!in) { | ||||
| AVDictionary *opts = NULL; | AVDictionary *opts = NULL; | ||||
| close_in = 1; | close_in = 1; | ||||
| /* Some HLS servers dont like being sent the range header */ | |||||
| /* Some HLS servers don't like being sent the range header */ | |||||
| av_dict_set(&opts, "seekable", "0", 0); | av_dict_set(&opts, "seekable", "0", 0); | ||||
| // broker prior HTTP options that should be consistent across requests | // broker prior HTTP options that should be consistent across requests | ||||
| @@ -87,7 +87,7 @@ static int64_t update_size(AVIOContext *pb, int64_t pos) | |||||
| static int supports_edts(MOVMuxContext *mov) | static int supports_edts(MOVMuxContext *mov) | ||||
| { | { | ||||
| // EDTS with fragments is tricky as we dont know the duration when its written | |||||
| // EDTS with fragments is tricky as we don't know the duration when its written | |||||
| return (mov->use_editlist<0 && !(mov->flags & FF_MOV_FLAG_FRAGMENT)) || mov->use_editlist>0; | return (mov->use_editlist<0 && !(mov->flags & FF_MOV_FLAG_FRAGMENT)) || mov->use_editlist>0; | ||||
| } | } | ||||
| @@ -119,7 +119,7 @@ static const AVOption options[] = { | |||||
| // backward compatibility | // backward compatibility | ||||
| { "resend_headers", "Reemit PAT/PMT before writing the next packet", | { "resend_headers", "Reemit PAT/PMT before writing the next packet", | ||||
| offsetof(MpegTSWrite, reemit_pat_pmt), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, | offsetof(MpegTSWrite, reemit_pat_pmt), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, | ||||
| { "mpegts_copyts", "dont offset dts/pts", | |||||
| { "mpegts_copyts", "don't offset dts/pts", | |||||
| offsetof(MpegTSWrite, copyts), AV_OPT_TYPE_INT, {.i64=-1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM}, | offsetof(MpegTSWrite, copyts), AV_OPT_TYPE_INT, {.i64=-1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM}, | ||||
| { NULL }, | { NULL }, | ||||
| }; | }; | ||||
| @@ -45,7 +45,7 @@ static const AVOption options[]={ | |||||
| {"igndts", "ignore dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_IGNDTS }, INT_MIN, INT_MAX, D, "fflags"}, | {"igndts", "ignore dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_IGNDTS }, INT_MIN, INT_MAX, D, "fflags"}, | ||||
| {"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"}, | {"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"}, | ||||
| {"sortdts", "try to interleave outputted packets by dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"}, | {"sortdts", "try to interleave outputted packets by dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"}, | ||||
| {"keepside", "dont merge side data", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"}, | |||||
| {"keepside", "don't merge side data", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"}, | |||||
| {"latm", "enable RTP MP4A-LATM payload", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"}, | {"latm", "enable RTP MP4A-LATM payload", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"}, | ||||
| {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"}, | {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"}, | ||||
| {"seek2any", "forces seeking to enable seek to any mode", OFFSET(seek2any), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, D}, | {"seek2any", "forces seeking to enable seek to any mode", OFFSET(seek2any), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, D}, | ||||
| @@ -70,7 +70,7 @@ static const AVOption options[]={ | |||||
| {"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_EXPLODE }, INT_MIN, INT_MAX, D, "err_detect"}, | {"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_EXPLODE }, INT_MIN, INT_MAX, D, "err_detect"}, | ||||
| {"careful", "consider things that violate the spec and have not been seen in the wild as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CAREFUL }, INT_MIN, INT_MAX, D, "err_detect"}, | {"careful", "consider things that violate the spec and have not been seen in the wild as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CAREFUL }, INT_MIN, INT_MAX, D, "err_detect"}, | ||||
| {"compliant", "consider all spec non compliancies as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_COMPLIANT }, INT_MIN, INT_MAX, D, "err_detect"}, | {"compliant", "consider all spec non compliancies as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_COMPLIANT }, INT_MIN, INT_MAX, D, "err_detect"}, | ||||
| {"aggressive", "consider things that a sane encoder shouldnt do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE }, INT_MIN, INT_MAX, D, "err_detect"}, | |||||
| {"aggressive", "consider things that a sane encoder shouldn't do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE }, INT_MIN, INT_MAX, D, "err_detect"}, | |||||
| {"use_wallclock_as_timestamps", "use wallclock as timestamps", OFFSET(use_wallclock_as_timestamps), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX-1, D}, | {"use_wallclock_as_timestamps", "use wallclock as timestamps", OFFSET(use_wallclock_as_timestamps), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX-1, D}, | ||||
| {"avoid_negative_ts", "shift timestamps to make them positive. 1 enables, 0 disables, default of -1 enables when required by target format.", OFFSET(avoid_negative_ts), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, E}, | {"avoid_negative_ts", "shift timestamps to make them positive. 1 enables, 0 disables, default of -1 enables when required by target format.", OFFSET(avoid_negative_ts), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, E}, | ||||
| {"skip_initial_bytes", "skip initial bytes", OFFSET(skip_initial_bytes), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX-1, D}, | {"skip_initial_bytes", "skip initial bytes", OFFSET(skip_initial_bytes), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX-1, D}, | ||||
| @@ -805,7 +805,7 @@ static int is_intra_only(AVCodecContext *enc){ | |||||
| static int has_decode_delay_been_guessed(AVStream *st) | static int has_decode_delay_been_guessed(AVStream *st) | ||||
| { | { | ||||
| if(st->codec->codec_id != AV_CODEC_ID_H264) return 1; | if(st->codec->codec_id != AV_CODEC_ID_H264) return 1; | ||||
| if(!st->info) // if we have left find_stream_info then nb_decoded_frames wont increase anymore for stream copy | |||||
| if(!st->info) // if we have left find_stream_info then nb_decoded_frames won't increase anymore for stream copy | |||||
| return 1; | return 1; | ||||
| #if CONFIG_H264_DECODER | #if CONFIG_H264_DECODER | ||||
| if(st->codec->has_b_frames && | if(st->codec->has_b_frames && | ||||
| @@ -58,7 +58,7 @@ void av_file_unmap(uint8_t *bufptr, size_t size); | |||||
| * @return file descriptor of opened file (or -1 on error) | * @return file descriptor of opened file (or -1 on error) | ||||
| * and opened file name in **filename. | * and opened file name in **filename. | ||||
| * @note On very old libcs it is necessary to set a secure umask before | * @note On very old libcs it is necessary to set a secure umask before | ||||
| * calling this, av_tempfile() cant call umask itself as it is used in | |||||
| * calling this, av_tempfile() can't call umask itself as it is used in | |||||
| * libraries and could interfere with the calling application. | * libraries and could interfere with the calling application. | ||||
| */ | */ | ||||
| int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); | int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); | ||||
| @@ -727,7 +727,7 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co | |||||
| } | } | ||||
| s->dither.noise_pos += out_count; | s->dither.noise_pos += out_count; | ||||
| } | } | ||||
| //FIXME packed doesnt need more than 1 chan here! | |||||
| //FIXME packed doesn't need more than 1 chan here! | |||||
| swri_audio_convert(s->out_convert, out, conv_src, out_count); | swri_audio_convert(s->out_convert, out, conv_src, out_count); | ||||
| } | } | ||||
| return out_count; | return out_count; | ||||
| @@ -747,7 +747,7 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun | |||||
| reversefill_audiodata(&s->drop_temp, tmp_arg); | reversefill_audiodata(&s->drop_temp, tmp_arg); | ||||
| s->drop_output *= -1; //FIXME find a less hackish solution | s->drop_output *= -1; //FIXME find a less hackish solution | ||||
| ret = swr_convert(s, tmp_arg, FFMIN(-s->drop_output, MAX_DROP_STEP), in_arg, in_count); //FIXME optimize but this is as good as never called so maybe it doesnt matter | |||||
| ret = swr_convert(s, tmp_arg, FFMIN(-s->drop_output, MAX_DROP_STEP), in_arg, in_count); //FIXME optimize but this is as good as never called so maybe it doesn't matter | |||||
| s->drop_output *= -1; | s->drop_output *= -1; | ||||
| in_count = 0; | in_count = 0; | ||||
| if(ret>0) { | if(ret>0) { | ||||