Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FFmpeg/FFmpeg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f7f5370b4b41
Choose a base ref
...
head repository: FFmpeg/FFmpeg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 032ba74ed29e
Choose a head ref

Commits on Oct 1, 2012

  1. Copy the full SHA
    d25fe4c View commit details
  2. Copy the full SHA
    d3c40a7 View commit details
  3. Copy the full SHA
    15d35be View commit details
  4. Opus encoder using libopus

    Signed-off-by: Diego Biurrun <diego@biurrun.de>
    saintdev authored and DonDiego committed Oct 1, 2012
    Copy the full SHA
    6cb8c85 View commit details
  5. Copy the full SHA
    cf8c93a View commit details
  6. Copy the full SHA
    461ba7e View commit details
  7. Copy the full SHA
    9af4eaa View commit details
  8. Copy the full SHA
    cbf6ee7 View commit details
  9. Copy the full SHA
    64c312a View commit details
  10. Copy the full SHA
    3fca0d7 View commit details
  11. avconv: improve sample format negotiation for decoder request

    This takes into account planar vs. packed when comparing to find the closest
    sample format match.
    justinruggles committed Oct 1, 2012
    Copy the full SHA
    fd41cb4 View commit details
  12. Copy the full SHA
    1a34590 View commit details
  13. Copy the full SHA
    a34be78 View commit details
  14. Copy the full SHA
    1478a36 View commit details
  15. Copy the full SHA
    bfcd4b6 View commit details
  16. Copy the full SHA
    55f9037 View commit details
  17. avformat: refactor avformat_write_header

    Mostly cosmetic changes adding some intermediate to shorten the lines.
    lu-zero committed Oct 1, 2012
    Copy the full SHA
    86bbdf8 View commit details
  18. avformat: refactor avformat_write_header

    Split away option settings, sanity checks and general setup.
    lu-zero committed Oct 1, 2012
    Copy the full SHA
    1e46c63 View commit details
  19. msvc: Fix detection of VFW & Avisynth required libs

    It should be vfw32.lib with MSVC.
    
    Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
    dwbuiten committed Oct 1, 2012
    Copy the full SHA
    bd680c7 View commit details
  20. Copy the full SHA
    5e3f997 View commit details

Commits on Oct 2, 2012

  1. Copy the full SHA
    9bc055e View commit details
  2. Copy the full SHA
    b92dfb5 View commit details
  3. nut: add do {} while (0) to GET_V

    Make it consistent with the other function-like macros.
    lu-zero committed Oct 2, 2012
    Copy the full SHA
    72d30b2 View commit details
  4. ARM: fix Thumb PIC on Apple

    LDR with register offset and PC as base register is not available in
    the Thumb instruction set so the addition must be done separately.
    
    Signed-off-by: Mans Rullgard <mans@mansr.com>
    mansr committed Oct 2, 2012
    Copy the full SHA
    7bda4ed View commit details
  5. Merge commit 'fd41cb43702498948ff14ba8c284fd5c15fc729d'

    * commit 'fd41cb43702498948ff14ba8c284fd5c15fc729d':
      avconv: improve sample format negotiation for decoder request
      Opus encoder using libopus
      mpegts: Drop pointless casting of hex_dump_debug arguments
      avformat: const correctness for av_hex_dump / av_hex_dump_log
      wmadec: Adjust debug printf argument length modifier
    
    Conflicts:
    	Changelog
    	ffmpeg.c
    	libavcodec/libopusdec.c
    	libavcodec/version.h
    
    Merged-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Oct 2, 2012
    Copy the full SHA
    82db8ee View commit details
  6. Merge commit 'bfcd4b6a1691d20aebc6d2308424c2a88334a9f0'

    * commit 'bfcd4b6a1691d20aebc6d2308424c2a88334a9f0':
      adpcmdec: set AVCodec.sample_fmts
      twinvq: use planar sample format
      ralf: use planar sample format
      mpc7/8: use planar sample format
      iac/imc: use planar sample format
      dcadec: use float planar sample format
      cook: use planar sample format
      atrac3: use float planar sample format
      apedec: output in planar sample format
      8svx: use planar sample format
    
    Conflicts:
    	libavcodec/8svx.c
    	libavcodec/dcadec.c
    	libavcodec/mpc7.c
    	libavcodec/mpc8.c
    
    Merged-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Oct 2, 2012
    Copy the full SHA
    e88ca80 View commit details
  7. libopusenc: use more specific and correct name for the channel order

    Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Oct 2, 2012
    Copy the full SHA
    f5b31da View commit details
  8. Merge commit '55f9037f38bc3beacb2f5a17408c1d24c077d7fd'

    * commit '55f9037f38bc3beacb2f5a17408c1d24c077d7fd':
      avformat: split muxing functions from util.c
    
    Conflicts:
    	libavformat/internal.h
    	libavformat/utils.c
    
    Merged-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Oct 2, 2012
    Copy the full SHA
    513042c View commit details
  9. Merge commit '86bbdf865e04bc5ddc2021b0620e6de634375253'

    * commit '86bbdf865e04bc5ddc2021b0620e6de634375253':
      avformat: refactor avformat_write_header
    
    Conflicts:
    	libavformat/mux.c
    
    Merged-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Oct 2, 2012
    Copy the full SHA
    6cbbf4a View commit details
  10. Merge commit '1e46c63eb72be752e044ba32257d77f35cbd9dac'

    * commit '1e46c63eb72be752e044ba32257d77f35cbd9dac':
      avformat: refactor avformat_write_header
    
    Conflicts:
    	libavformat/mux.c
    
    Merged-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Oct 2, 2012
    Copy the full SHA
    dd78e10 View commit details
  11. Merge remote-tracking branch 'qatar/master'

    * qatar/master:
      ARM: fix Thumb PIC on Apple
      nut: add do {} while (0) to GET_V
      tiffenc: Check av_malloc() results.
      tiffenc: Simplify pixel format setup using AVPixFmtDescriptor.
      Use atexit() instead of defining a custom exit_program() interface.
      msvc: Fix detection of VFW & Avisynth required libs
    
    Conflicts:
    	ffmpeg.c
    	ffmpeg_opt.c
    	ffplay.c
    	ffprobe.c
    	ffserver.c
    	libavcodec/tiffenc.c
    
    Merged-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Oct 2, 2012
    Copy the full SHA
    032ba74 View commit details
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
version next:
- stream disposition information printing in ffprobe
- filter for loudness analysis following EBU R128
- Opus encoder using libopus


version 1.0:
18 changes: 9 additions & 9 deletions cmdutils.c
Original file line number Diff line number Diff line change
@@ -126,7 +126,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type,
else
return d;
av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max);
exit_program(1);
exit(1);
return 0;
}

@@ -137,7 +137,7 @@ int64_t parse_time_or_die(const char *context, const char *timestr,
if (av_parse_time(&us, timestr, is_duration) < 0) {
av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n",
is_duration ? "duration" : "date", context, timestr);
exit_program(1);
exit(1);
}
return us;
}
@@ -325,7 +325,7 @@ int parse_option(void *optctx, const char *opt, const char *arg,
}
}
if (po->flags & OPT_EXIT)
exit_program(0);
exit(0);
return !!(po->flags & HAS_ARG);
}

@@ -351,7 +351,7 @@ void parse_options(void *optctx, int argc, char **argv, const OptionDef *options
opt++;

if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0)
exit_program(1);
exit(1);
optindex += ret;
} else {
if (parse_arg_function)
@@ -511,7 +511,7 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
"Possible levels are numbers or:\n", arg);
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++)
av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name);
exit_program(1);
exit(1);
}
av_log_set_level(level);
return 0;
@@ -557,7 +557,7 @@ int opt_max_alloc(void *optctx, const char *opt, const char *arg)
max = strtol(arg, &tail, 10);
if (*tail) {
av_log(NULL, AV_LOG_FATAL, "Invalid max_alloc \"%s\".\n", arg);
exit_program(1);
exit(1);
}
av_max_alloc(max);
return 0;
@@ -909,7 +909,7 @@ static unsigned get_codecs_sorted(const AVCodecDescriptor ***rcodecs)
nb_codecs++;
if (!(codecs = av_calloc(nb_codecs, sizeof(*codecs)))) {
av_log(0, AV_LOG_ERROR, "Out of memory\n");
exit_program(1);
exit(1);
}
desc = NULL;
while ((desc = avcodec_descriptor_next(desc)))
@@ -1467,13 +1467,13 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
{
if (new_size >= INT_MAX / elem_size) {
av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
exit_program(1);
exit(1);
}
if (*size < new_size) {
uint8_t *tmp = av_realloc(array, new_size*elem_size);
if (!tmp) {
av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
exit_program(1);
exit(1);
}
memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
*size = new_size;
8 changes: 1 addition & 7 deletions cmdutils.h
Original file line number Diff line number Diff line change
@@ -410,15 +410,9 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
FILE *get_preset_file(char *filename, size_t filename_size,
const char *preset_name, int is_path, const char *codec_name);

/**
* Do all the necessary cleanup and abort.
* This function is implemented in the avtools, not cmdutils.
*/
av_noreturn void exit_program(int ret);

/**
* Realloc array to hold new_size elements of elem_size.
* Calls exit_program() on failure.
* Calls exit() on failure.
*
* @param elem_size size in bytes of each element
* @param size new element count will be written here
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -1768,6 +1768,7 @@ libopencore_amrwb_decoder_deps="libopencore_amrwb"
libopenjpeg_decoder_deps="libopenjpeg"
libopenjpeg_encoder_deps="libopenjpeg"
libopus_decoder_deps="libopus"
libopus_encoder_deps="libopus"
libschroedinger_decoder_deps="libschroedinger"
libschroedinger_encoder_deps="libschroedinger"
libspeex_decoder_deps="libspeex"
@@ -2409,6 +2410,8 @@ msvc_flags(){
-fno-common) ;;
-fno-signed-zeros) ;;
-lz) echo zlib.lib ;;
-lavifil32) echo vfw32.lib ;;
-lavicap32) echo vfw32.lib user32.lib ;;
-l*) echo ${flag#-l}.lib ;;
*) echo $flag ;;
esac
2 changes: 1 addition & 1 deletion doc/general.texi
Original file line number Diff line number Diff line change
@@ -813,7 +813,7 @@ following image formats are supported:
@item Musepack SV7 @tab @tab X
@item Musepack SV8 @tab @tab X
@item Nellymoser Asao @tab X @tab X
@item Opus @tab @tab E
@item Opus @tab E @tab E
@tab supported through external library libopus
@item PCM A-law @tab X @tab X
@item PCM mu-law @tab X @tab X
58 changes: 29 additions & 29 deletions ffmpeg.c
Original file line number Diff line number Diff line change
@@ -378,7 +378,7 @@ static int decode_interrupt_cb(void *ctx)

const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL };

void av_noreturn exit_program(int ret)
static void exit_program()
{
int i, j;

@@ -456,16 +456,14 @@ void av_noreturn exit_program(int ret)
(int) received_sigterm);
exit (255);
}

exit(ret);
}

void assert_avoptions(AVDictionary *m)
{
AVDictionaryEntry *t;
if ((t = av_dict_get(m, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key);
exit_program(1);
exit(1);
}
}

@@ -482,7 +480,7 @@ static void assert_codec_experimental(AVCodecContext *c, int encoder)
if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL))
av_log(NULL, AV_LOG_FATAL, "Or use the non experimental %s '%s'.\n",
codec_string, codec->name);
exit_program(1);
exit(1);
}
}

@@ -564,7 +562,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
avctx->codec ? avctx->codec->name : "copy");
print_error("", a);
if (exit_on_error)
exit_program(1);
exit(1);
}
*pkt = new_pkt;

@@ -586,7 +584,7 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
ret = av_interleaved_write_frame(s, pkt);
if (ret < 0) {
print_error("av_interleaved_write_frame()", ret);
exit_program(1);
exit(1);
}
}

@@ -637,7 +635,7 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost,
update_benchmark(NULL);
if (avcodec_encode_audio2(enc, &pkt, frame, &got_packet) < 0) {
av_log(NULL, AV_LOG_FATAL, "Audio encoding failed (avcodec_encode_audio2)\n");
exit_program(1);
exit(1);
}
update_benchmark("encode_audio %d.%d", ost->file_index, ost->index);

@@ -716,7 +714,7 @@ static void do_subtitle_out(AVFormatContext *s,
if (sub->pts == AV_NOPTS_VALUE) {
av_log(NULL, AV_LOG_ERROR, "Subtitle packets must have a pts\n");
if (exit_on_error)
exit_program(1);
exit(1);
return;
}

@@ -752,7 +750,7 @@ static void do_subtitle_out(AVFormatContext *s,
subtitle_out_max_size, sub);
if (subtitle_out_size < 0) {
av_log(NULL, AV_LOG_FATAL, "Subtitle encoding failed\n");
exit_program(1);
exit(1);
}

av_init_packet(&pkt);
@@ -895,7 +893,7 @@ static void do_video_out(AVFormatContext *s,
update_benchmark("encode_video %d.%d", ost->file_index, ost->index);
if (ret < 0) {
av_log(NULL, AV_LOG_FATAL, "Video encoding failed\n");
exit_program(1);
exit(1);
}

if (got_packet) {
@@ -955,7 +953,7 @@ static void do_video_stats(AVFormatContext *os, OutputStream *ost,
vstats_file = fopen(vstats_filename, "w");
if (!vstats_file) {
perror("fopen");
exit_program(1);
exit(1);
}
}

@@ -1288,7 +1286,7 @@ static void flush_encoders(void)
update_benchmark("flush %s %d.%d", desc, ost->file_index, ost->index);
if (ret < 0) {
av_log(NULL, AV_LOG_FATAL, "%s encoding failed\n", desc);
exit_program(1);
exit(1);
}
*size += pkt.size;
if (ost->logfile && enc->stats_out) {
@@ -1481,7 +1479,7 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
av_log(NULL, AV_LOG_FATAL, "Unable to find default channel "
"layout for Input Stream #%d.%d\n", ist->file_index,
ist->st->index);
exit_program(1);
exit(1);
}
decoded_frame->channel_layout = avctx->channel_layout;

@@ -1509,7 +1507,7 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
int j;
if (configure_filtergraph(fg) < 0) {
av_log(NULL, AV_LOG_FATAL, "Error reinitializing filters!\n");
exit_program(1);
exit(1);
}
for (j = 0; j < fg->nb_outputs; j++) {
OutputStream *ost = fg->outputs[j]->ost;
@@ -1624,7 +1622,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
if (ist_in_filtergraph(filtergraphs[i], ist) &&
configure_filtergraph(filtergraphs[i]) < 0) {
av_log(NULL, AV_LOG_FATAL, "Error reinitializing filters!\n");
exit_program(1);
exit(1);
}
}

@@ -1660,7 +1658,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
} else
if(av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame, AV_BUFFERSRC_FLAG_PUSH)<0) {
av_log(NULL, AV_LOG_FATAL, "Failed to inject frame into filter network\n");
exit_program(1);
exit(1);
}

}
@@ -1859,7 +1857,7 @@ static void print_sdp(void)
AVFormatContext **avc = av_malloc(sizeof(*avc) * nb_output_files);

if (!avc)
exit_program(1);
exit(1);
for (i = 0; i < nb_output_files; i++)
avc[i] = output_files[i]->ctx;

@@ -1927,7 +1925,7 @@ static void parse_forced_key_frames(char *kf, OutputStream *ost,
ost->forced_kf_pts = av_malloc(sizeof(*ost->forced_kf_pts) * n);
if (!ost->forced_kf_pts) {
av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n");
exit_program(1);
exit(1);
}

p = kf;
@@ -2093,7 +2091,7 @@ static int transcode_init(void)
case AVMEDIA_TYPE_AUDIO:
if (audio_volume != 256) {
av_log(NULL, AV_LOG_FATAL, "-acodec copy and -vol are incompatible (frames are not decoded)\n");
exit_program(1);
exit(1);
}
codec->channel_layout = icodec->channel_layout;
codec->sample_rate = icodec->sample_rate;
@@ -2240,7 +2238,7 @@ static int transcode_init(void)
if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) {
av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n",
logfilename);
exit_program(1);
exit(1);
}
codec->stats_in = logbuffer;
}
@@ -2249,7 +2247,7 @@ static int transcode_init(void)
if (!f) {
av_log(NULL, AV_LOG_FATAL, "Cannot write log file '%s' for pass-1 encoding: %s\n",
logfilename, strerror(errno));
exit_program(1);
exit(1);
}
ost->logfile = f;
}
@@ -2724,7 +2722,7 @@ static int process_input(int file_index)
if (ret != AVERROR_EOF) {
print_error(is->filename, ret);
if (exit_on_error)
exit_program(1);
exit(1);
}
ifile->eof_reached = 1;

@@ -2845,7 +2843,7 @@ static int process_input(int file_index)
av_log(NULL, AV_LOG_ERROR, "Error while decoding stream #%d:%d: %s\n",
ist->file_index, ist->st->index, buf);
if (exit_on_error)
exit_program(1);
exit(1);
}

discard_packet:
@@ -3119,6 +3117,8 @@ int main(int argc, char **argv)
OptionsContext o = { 0 };
int64_t ti;

atexit(exit_program);

reset_options(&o, 0);

setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */
@@ -3153,29 +3153,29 @@ int main(int argc, char **argv)
if (nb_output_files <= 0 && nb_input_files == 0) {
show_usage();
av_log(NULL, AV_LOG_WARNING, "Use -h to get full help or, even better, run 'man %s'\n", program_name);
exit_program(1);
exit(1);
}

/* file converter / grab */
if (nb_output_files <= 0) {
av_log(NULL, AV_LOG_FATAL, "At least one output file must be specified\n");
exit_program(1);
exit(1);
}

// if (nb_input_files == 0) {
// av_log(NULL, AV_LOG_FATAL, "At least one input file must be specified\n");
// exit_program(1);
// exit(1);
// }

current_time = ti = getutime();
if (transcode() < 0)
exit_program(1);
exit(1);
ti = getutime() - ti;
if (do_benchmark) {
int maxrss = getmaxrss() / 1024;
printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss);
}

exit_program(0);
exit(0);
return 0;
}
Loading