Reduce diff against avconv, and change some doxycomments into normal comments (no point in doxifying ffmpeg internal fields).
Unified · Split
| @@ -35,6 +35,7 @@ · 34 unmodified lines | ||
| 35 | 35 | #include "libavformat/avformat.h" |
| 36 | 36 | #include "libavdevice/avdevice.h" |
| 37 | 37 | #include "libswscale/swscale.h" |
| 38 | +#include "libswresample/swresample.h" | |
| 38 | 39 | #include "libavutil/opt.h" |
| 39 | 40 | #include "libavutil/audioconvert.h" |
| 40 | 41 | #include "libavutil/parseutils.h" |
| @@ -51,15 +52,14 @@ · 10 unmodified lines | ||
| 51 | 52 | #include "libavutil/timestamp.h" |
| 52 | 53 | #include "libavutil/bprint.h" |
| 53 | 54 | #include "libavformat/os_support.h" |
| 54 | −#include "libswresample/swresample.h" | |
| 55 | 55 | |
| 56 | 56 | #include "libavformat/ffm.h" // not public API |
| 57 | 57 | |
| 58 | 58 | # include "libavfilter/avcodec.h" |
| 59 | 59 | # include "libavfilter/avfilter.h" |
| 60 | 60 | # include "libavfilter/avfiltergraph.h" |
| 61 | −# include "libavfilter/buffersink.h" | |
| 62 | 61 | # include "libavfilter/buffersrc.h" |
| 62 | +# include "libavfilter/buffersink.h" | |
| 63 | 63 | |
| 64 | 64 | #if HAVE_SYS_RESOURCE_H |
| 65 | 65 | #include <sys/types.h> |
| @@ -97,7 +97,6 @@ · 31 unmodified lines | ||
| 97 | 97 | #define VSYNC_VFR 2 |
| 98 | 98 | #define VSYNC_DROP 0xff |
| 99 | 99 | |
| 100 | −// #define SRCA | |
| 101 | 100 | #define SINKA |
| 102 | 101 | |
| 103 | 102 | const char program_name[] = "ffmpeg"; |
| @@ -228,8 +227,8 @@ typedef struct InputStream { · 124 unmodified lines | ||
| 228 | 227 | /* dts of the last packet read for this stream */ |
| 229 | 228 | int64_t dts; |
| 230 | 229 | |
| 231 | − int64_t next_pts; ///< synthetic pts for the next decode frame | |
| 232 | − int64_t pts; ///< current pts of the decoded frame | |
| 230 | + int64_t next_pts; /* synthetic pts for the next decode frame */ | |
| 231 | + int64_t pts; /* current pts of the decoded frame */ | |
| 233 | 232 | double ts_scale; |
| 234 | 233 | int is_start; /* is 1 at the start and after a discontinuity */ |
| 235 | 234 | int saw_first_ts; |
| @@ -376,8 +375,8 @@ typedef struct OptionsContext { · 140 unmodified lines | ||
| 376 | 375 | /* output options */ |
| 377 | 376 | StreamMap *stream_maps; |
| 378 | 377 | int nb_stream_maps; |
| 379 | − AudioChannelMap *audio_channel_maps; ///< one info entry per -map_channel | |
| 380 | − int nb_audio_channel_maps; ///< number of (valid) -map_channel settings | |
| 378 | + AudioChannelMap *audio_channel_maps; /* one info entry per -map_channel */ | |
| 379 | + int nb_audio_channel_maps; /* number of (valid) -map_channel settings */ | |
| 381 | 380 | int metadata_global_manual; |
| 382 | 381 | int metadata_streams_manual; |
| 383 | 382 | int metadata_chapters_manual; |
| @@ -931,8 +930,10 @@ static int configure_video_filters(FilterGraph *fg, AVFilterContext **in_filter, · 547 unmodified lines | ||
| 931 | 930 | sample_aspect_ratio = ist->st->codec->sample_aspect_ratio; |
| 932 | 931 | |
| 933 | 932 | snprintf(args, 255, "%d:%d:%d:%d:%d:%d:%d:flags=%d", ist->st->codec->width, |
| 934 | − ist->st->codec->height, ist->st->codec->pix_fmt, 1, AV_TIME_BASE, | |
| 935 | − sample_aspect_ratio.num, sample_aspect_ratio.den, SWS_BILINEAR + ((ist->st->codec->flags&CODEC_FLAG_BITEXACT) ? SWS_BITEXACT:0)); | |
| 933 | + ist->st->codec->height, ist->st->codec->pix_fmt, | |
| 934 | + 1, AV_TIME_BASE, | |
| 935 | + sample_aspect_ratio.num, sample_aspect_ratio.den, | |
| 936 | + SWS_BILINEAR + ((ist->st->codec->flags&CODEC_FLAG_BITEXACT) ? SWS_BITEXACT:0)); | |
| 936 | 937 | |
| 937 | 938 | ret = avfilter_graph_create_filter(&fg->inputs[0]->filter, |
| 938 | 939 | avfilter_get_by_name("buffer"), |
| @@ -1482,7 +1483,7 @@ void av_noreturn exit_program(int ret) · 543 unmodified lines | ||
| 1482 | 1483 | exit (255); |
| 1483 | 1484 | } |
| 1484 | 1485 | |
| 1485 | − exit(ret); /* not all OS-es handle main() return value */ | |
| 1486 | + exit(ret); | |
| 1486 | 1487 | } |
| 1487 | 1488 | |
| 1488 | 1489 | static void assert_avoptions(AVDictionary *m) |
| @@ -1645,9 +1646,8 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost, · 156 unmodified lines | ||
| 1645 | 1646 | if (got_packet) { |
| 1646 | 1647 | if (pkt.pts != AV_NOPTS_VALUE) |
| 1647 | 1648 | pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base); |
| 1648 | − if (pkt.dts != AV_NOPTS_VALUE) { | |
| 1649 | + if (pkt.dts != AV_NOPTS_VALUE) | |
| 1649 | 1650 | pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base); |
| 1650 | − } | |
| 1651 | 1651 | if (pkt.duration > 0) |
| 1652 | 1652 | pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base); |
| 1653 | 1653 | |
| @@ -2534,7 +2534,6 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int · 880 unmodified lines | ||
| 2534 | 2534 | ist->next_pts = ist->pts = decoded_frame->pts = best_effort_timestamp; |
| 2535 | 2535 | |
| 2536 | 2536 | pkt->size = 0; |
| 2537 | − | |
| 2538 | 2537 | pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free); |
| 2539 | 2538 | |
| 2540 | 2539 | rate_emu_sleep(ist); |
| @@ -3085,7 +3084,7 @@ static int transcode_init(void) · 544 unmodified lines | ||
| 3085 | 3084 | size_t logbuffer_size; |
| 3086 | 3085 | if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) { |
| 3087 | 3086 | av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n", |
| 3088 | − logfilename); | |
| 3087 | + logfilename); | |
| 3089 | 3088 | exit_program(1); |
| 3090 | 3089 | } |
| 3091 | 3090 | codec->stats_in = logbuffer; |
| @@ -4978,7 +4977,7 @@ loop_end: · 1886 unmodified lines | ||
| 4978 | 4977 | case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break; |
| 4979 | 4978 | default: |
| 4980 | 4979 | av_log(NULL, AV_LOG_FATAL, "Cannot map stream #%d:%d - unsupported type.\n", |
| 4981 | − map->file_index, map->stream_index); | |
| 4980 | + map->file_index, map->stream_index); | |
| 4982 | 4981 | exit_program(1); |
| 4983 | 4982 | } |
| 4984 | 4983 | } |