History

ffmpeg: misc cosmetics.

Reduce diff against avconv, and change some doxycomments into normal comments (no point in doxifying ffmpeg internal fields).

Clément Bœsch committed 14 years ago

Commit eb945ab1 parent 00be2f51 file · +14 −15Browse files

Unified · Split

ffmpeg.c+14−15
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #include "libavformat/avformat.h"
3636 #include "libavdevice/avdevice.h"
3737 #include "libswscale/swscale.h"
38+#include "libswresample/swresample.h"
3839 #include "libavutil/opt.h"
3940 #include "libavutil/audioconvert.h"
4041 #include "libavutil/parseutils.h"
@@ -51,15 +52,14 @@ · 10 unmodified lines
5152 #include "libavutil/timestamp.h"
5253 #include "libavutil/bprint.h"
5354 #include "libavformat/os_support.h"
54−#include "libswresample/swresample.h"
5555
5656 #include "libavformat/ffm.h" // not public API
5757
5858 # include "libavfilter/avcodec.h"
5959 # include "libavfilter/avfilter.h"
6060 # include "libavfilter/avfiltergraph.h"
61−# include "libavfilter/buffersink.h"
6261 # include "libavfilter/buffersrc.h"
62+# include "libavfilter/buffersink.h"
6363
6464 #if HAVE_SYS_RESOURCE_H
6565 #include <sys/types.h>
@@ -97,7 +97,6 @@ · 31 unmodified lines
9797 #define VSYNC_VFR 2
9898 #define VSYNC_DROP 0xff
9999
100−// #define SRCA
101100 #define SINKA
102101
103102 const char program_name[] = "ffmpeg";
@@ -228,8 +227,8 @@ typedef struct InputStream { · 124 unmodified lines
228227 /* dts of the last packet read for this stream */
229228 int64_t dts;
230229
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 */
233232 double ts_scale;
234233 int is_start; /* is 1 at the start and after a discontinuity */
235234 int saw_first_ts;
@@ -376,8 +375,8 @@ typedef struct OptionsContext { · 140 unmodified lines
376375 /* output options */
377376 StreamMap *stream_maps;
378377 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 */
381380 int metadata_global_manual;
382381 int metadata_streams_manual;
383382 int metadata_chapters_manual;
@@ -931,8 +930,10 @@ static int configure_video_filters(FilterGraph *fg, AVFilterContext **in_filter, · 547 unmodified lines
931930 sample_aspect_ratio = ist->st->codec->sample_aspect_ratio;
932931
933932 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));
936937
937938 ret = avfilter_graph_create_filter(&fg->inputs[0]->filter,
938939 avfilter_get_by_name("buffer"),
@@ -1482,7 +1483,7 @@ void av_noreturn exit_program(int ret) · 543 unmodified lines
14821483 exit (255);
14831484 }
14841485
1485− exit(ret); /* not all OS-es handle main() return value */
1486+ exit(ret);
14861487 }
14871488
14881489 static void assert_avoptions(AVDictionary *m)
@@ -1645,9 +1646,8 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost, · 156 unmodified lines
16451646 if (got_packet) {
16461647 if (pkt.pts != AV_NOPTS_VALUE)
16471648 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)
16491650 pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base);
1650− }
16511651 if (pkt.duration > 0)
16521652 pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base);
16531653
@@ -2534,7 +2534,6 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int · 880 unmodified lines
25342534 ist->next_pts = ist->pts = decoded_frame->pts = best_effort_timestamp;
25352535
25362536 pkt->size = 0;
2537−
25382537 pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free);
25392538
25402539 rate_emu_sleep(ist);
@@ -3085,7 +3084,7 @@ static int transcode_init(void) · 544 unmodified lines
30853084 size_t logbuffer_size;
30863085 if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) {
30873086 av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n",
3088− logfilename);
3087+ logfilename);
30893088 exit_program(1);
30903089 }
30913090 codec->stats_in = logbuffer;
@@ -4978,7 +4977,7 @@ loop_end: · 1886 unmodified lines
49784977 case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break;
49794978 default:
49804979 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);
49824981 exit_program(1);
49834982 }
49844983 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t