[FFmpeg-soc] [soc]: r4613 - concat/ffmpeg.c.diff
gkovacs
subversion at mplayerhq.hu
Sun Jul 5 08:16:41 CEST 2009
Author: gkovacs
Date: Sun Jul 5 08:16:41 2009
New Revision: 4613
Log:
removed extra debugging code to shorten size of diff
Modified:
concat/ffmpeg.c.diff
Modified: concat/ffmpeg.c.diff
==============================================================================
--- concat/ffmpeg.c.diff Sun Jul 5 08:08:47 2009 (r4612)
+++ concat/ffmpeg.c.diff Sun Jul 5 08:16:41 2009 (r4613)
@@ -1,5 +1,5 @@
diff --git a/ffmpeg.c b/ffmpeg.c
-index 22bfed8..cfbc87a 100644
+index 22bfed8..dbef707 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -70,6 +70,8 @@
@@ -56,45 +56,7 @@ index 22bfed8..cfbc87a 100644
if(ist->next_pts == AV_NOPTS_VALUE)
ist->next_pts= ist->pts;
-@@ -1292,8 +1316,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
- endianness as CPU */
- ret = avcodec_decode_audio3(ist->st->codec, samples, &data_size,
- &avpkt);
-- if (ret < 0)
-+ if (ret < 0) {
-+ fprintf(stderr, "fail_decode 1 with ret %d\n", ret);
- goto fail_decode;
-+ }
- avpkt.data += ret;
- avpkt.size -= ret;
- /* Some bug in mpeg audio decoder gives */
-@@ -1314,9 +1340,12 @@ static int output_packet(AVInputStream *ist, int ist_index,
- ret = avcodec_decode_video2(ist->st->codec,
- &picture, &got_picture, &avpkt);
- ist->st->quality= picture.quality;
-- if (ret < 0)
-+ if (ret < 0) {
-+ fprintf(stderr, "fail_decode 2 with ret %d\n", ret);
- goto fail_decode;
-+ }
- if (!got_picture) {
-+ fprintf(stderr, "no picture frame\n");
- /* no picture yet */
- goto discard_packet;
- }
-@@ -1331,8 +1360,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
- case CODEC_TYPE_SUBTITLE:
- ret = avcodec_decode_subtitle2(ist->st->codec,
- &subtitle, &got_subtitle, &avpkt);
-- if (ret < 0)
-+ if (ret < 0) {
-+ fprintf(stderr, "fail_decode 3 with ret %d\n", ret);
- goto fail_decode;
-+ }
- if (!got_subtitle) {
- goto discard_packet;
- }
-@@ -1644,6 +1675,7 @@ static int av_encode(AVFormatContext **output_files,
+@@ -1644,6 +1668,7 @@ static int av_encode(AVFormatContext **output_files,
uint8_t no_packet[MAX_FILES]={0};
int no_packet_count=0;
@@ -102,19 +64,17 @@ index 22bfed8..cfbc87a 100644
file_table= av_mallocz(nb_input_files * sizeof(AVInputFile));
if (!file_table)
goto fail;
-@@ -2278,8 +2310,9 @@ static int av_encode(AVFormatContext **output_files,
+@@ -2278,8 +2303,7 @@ static int av_encode(AVFormatContext **output_files,
}
//fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->index, pkt.size);
- if (output_packet(ist, ist_index, ost_table, nb_ostreams, &pkt) < 0) {
-
-+ int otpakv = output_packet(ist, ist_index, ost_table, nb_ostreams, &pkt, is);
-+ if (otpakv < 0) {
-+ fprintf(stderr, "error while decoding stream: %d\n", otpakv);
++ if (output_packet(ist, ist_index, ost_table, nb_ostreams, &pkt, is) < 0) {
if (verbose >= 0)
fprintf(stderr, "Error while decoding stream #%d.%d\n",
ist->file_index, ist->index);
-@@ -2300,7 +2333,7 @@ static int av_encode(AVFormatContext **output_files,
+@@ -2300,7 +2324,7 @@ static int av_encode(AVFormatContext **output_files,
for(i=0;i<nb_istreams;i++) {
ist = ist_table[i];
if (ist->decoding_needed) {
@@ -123,7 +83,7 @@ index 22bfed8..cfbc87a 100644
}
}
-@@ -2848,6 +2881,7 @@ static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
+@@ -2848,6 +2872,7 @@ static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
static void opt_input_file(const char *filename)
{
@@ -131,7 +91,7 @@ index 22bfed8..cfbc87a 100644
AVFormatContext *ic;
AVFormatParameters params, *ap = ¶ms;
int err, i, ret, rfps, rfps_base;
-@@ -2859,6 +2893,43 @@ static void opt_input_file(const char *filename)
+@@ -2859,6 +2884,43 @@ static void opt_input_file(const char *filename)
using_stdin |= !strncmp(filename, "pipe:", 5) ||
!strcmp(filename, "/dev/stdin");
@@ -175,7 +135,7 @@ index 22bfed8..cfbc87a 100644
/* get default parameters from command line */
ic = avformat_alloc_context();
-@@ -2925,6 +2996,8 @@ static void opt_input_file(const char *filename)
+@@ -2925,6 +2987,8 @@ static void opt_input_file(const char *filename)
start_time = 0;
}
@@ -184,7 +144,7 @@ index 22bfed8..cfbc87a 100644
/* update the current parameters so that they match the one of the input stream */
for(i=0;i<ic->nb_streams;i++) {
AVCodecContext *enc = ic->streams[i]->codec;
-@@ -3000,6 +3073,8 @@ static void opt_input_file(const char *filename)
+@@ -3000,6 +3064,8 @@ static void opt_input_file(const char *filename)
dump_format(ic, nb_input_files, filename, 0);
nb_input_files++;
@@ -193,7 +153,7 @@ index 22bfed8..cfbc87a 100644
file_iformat = NULL;
file_oformat = NULL;
-@@ -3874,6 +3949,7 @@ static const OptionDef options[] = {
+@@ -3874,6 +3940,7 @@ static const OptionDef options[] = {
{ "programid", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&opt_programid}, "desired program number", "" },
{ "xerror", OPT_BOOL, {(void*)&exit_on_error}, "exit on error", "error" },
{ "copyinkf", OPT_BOOL | OPT_EXPERT, {(void*)©_initial_nonkeyframes}, "copy initial non-keyframes" },
More information about the FFmpeg-soc
mailing list