From 41d2008b15c2e80aeaa53f3db8f9c51da13c788d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Feb 2013 09:53:28 +0100 Subject: avconv: use a local variable for InputFile in open_input_file(). This is shorter and more readable. --- avconv_opt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/avconv_opt.c b/avconv_opt.c index 1d641af80a..cd3f7f65b2 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -546,6 +546,7 @@ static void dump_attachment(AVStream *st, const char *filename) static int open_input_file(OptionsContext *o, const char *filename) { + InputFile *f; AVFormatContext *ic; AVInputFormat *file_iformat = NULL; int err, i, ret; @@ -654,14 +655,16 @@ static int open_input_file(OptionsContext *o, const char *filename) av_dump_format(ic, nb_input_files, filename, 0); GROW_ARRAY(input_files, nb_input_files); - if (!(input_files[nb_input_files - 1] = av_mallocz(sizeof(*input_files[0])))) + f = av_mallocz(sizeof(*f)); + if (!f) exit(1); + input_files[nb_input_files - 1] = f; - input_files[nb_input_files - 1]->ctx = ic; - input_files[nb_input_files - 1]->ist_index = nb_input_streams - ic->nb_streams; - input_files[nb_input_files - 1]->ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp); - input_files[nb_input_files - 1]->nb_streams = ic->nb_streams; - input_files[nb_input_files - 1]->rate_emu = o->rate_emu; + f->ctx = ic; + f->ist_index = nb_input_streams - ic->nb_streams; + f->ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp); + f->nb_streams = ic->nb_streams; + f->rate_emu = o->rate_emu; for (i = 0; i < o->nb_dump_attachment; i++) { int j; -- cgit v1.2.3 From 6deae8e0530a885b76f149841ed4899cb438ec23 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Feb 2013 10:50:57 +0100 Subject: FATE: remove the -dct option from some decoding tests. It is an encoding option, it has no effect when applied to decoding. --- tests/fate/microsoft.mak | 2 +- tests/fate/real.mak | 2 +- tests/fate/video.mak | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak index af5d57fe7b..a3d6fc45c3 100644 --- a/tests/fate/microsoft.mak +++ b/tests/fate/microsoft.mak @@ -1,5 +1,5 @@ FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, MSMPEG4V1) += fate-msmpeg4v1 -fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an +fate-msmpeg4v1: CMD = framecrc -flags +bitexact -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an FATE_MSVIDEO1 += fate-msvideo1-8bit fate-msvideo1-8bit: CMD = framecrc -i $(SAMPLES)/cram/skating.avi -t 1 -pix_fmt rgb24 diff --git a/tests/fate/real.mak b/tests/fate/real.mak index f3866b6f25..2666be6d4b 100644 --- a/tests/fate/real.mak +++ b/tests/fate/real.mak @@ -13,7 +13,7 @@ fate-ra-cook: CMP = oneoff fate-ra-cook: REF = $(SAMPLES)/real/ra_cook.pcm FATE_SAMPLES_AVCONV-$(call DEMDEC, RM, RV30) += fate-rv30 -fate-rv30: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/real/rv30.rm -an +fate-rv30: CMD = framecrc -flags +bitexact -idct simple -i $(SAMPLES)/real/rv30.rm -an FATE_SAMPLES_AVCONV-$(call DEMDEC, RM, RV40) += fate-rv40 fate-rv40: CMD = framecrc -i $(SAMPLES)/real/spygames-2MB.rmvb -t 10 -an -vsync 0 diff --git a/tests/fate/video.mak b/tests/fate/video.mak index 30a06f0a44..16a9650c83 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -173,7 +173,7 @@ FATE_SAMPLES_AVCONV-$(call DEMDEC, MVI, MOTIONPIXELS) += fate-motionpixels fate-motionpixels: CMD = framecrc -i $(SAMPLES)/motion-pixels/INTRO-partial.MVI -an -pix_fmt rgb24 -vframes 111 FATE_SAMPLES_AVCONV-$(call DEMDEC, MPEGTS, MPEG2VIDEO) += fate-mpeg2-field-enc -fate-mpeg2-field-enc: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/mpeg2/mpeg2_field_encoding.ts -an -vframes 30 +fate-mpeg2-field-enc: CMD = framecrc -flags +bitexact -idct simple -i $(SAMPLES)/mpeg2/mpeg2_field_encoding.ts -an -vframes 30 # FIXME dropped frames in this test because of coarse timebase FATE_NUV += fate-nuv-rtjpeg -- cgit v1.2.3