summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-29 01:55:12 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-29 01:55:12 +0000
commitc04643a2c24564aed96a5b0760de8bf02eb305c6 (patch)
tree445c59c26348b33ec428e6c364d1feb07e2ea2e0
parente9c0a38ff0a9d4754220ae3432b2cdebe5a1c781 (diff)
* Make video grabbing work again (if you are grabbing multiple streams
at different frame rates). * Do the av_abort() change that is not otherwise worth checking in. Originally committed as revision 620 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index e93d730032..e4db82987b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -422,8 +422,6 @@ static void do_video_out(AVFormatContext *s,
AVCodecContext *enc, *dec;
#define VIDEO_BUFFER_SIZE (1024*1024)
- video_buffer= av_malloc(VIDEO_BUFFER_SIZE);
- if(!video_buffer) return;
enc = &ost->st->codec;
dec = &ist->st->codec;
@@ -438,6 +436,9 @@ static void do_video_out(AVFormatContext *s,
if (nb <= 0)
return;
+ video_buffer= av_malloc(VIDEO_BUFFER_SIZE);
+ if(!video_buffer) return;
+
/* deinterlace : must be done before any resize */
if (do_deinterlace) {
int size;
@@ -805,7 +806,7 @@ static int av_encode(AVFormatContext **output_files,
}
break;
default:
- abort();
+ av_abort();
}
}
@@ -1038,7 +1039,7 @@ static int av_encode(AVFormatContext **output_files,
ist->ticker_inited = 1;
break;
default:
- abort();
+ av_abort();
}
}
/* update pts */
@@ -1058,7 +1059,7 @@ static int av_encode(AVFormatContext **output_files,
ist->st->codec.frame_rate;
break;
default:
- abort();
+ av_abort();
}
ptr += ret;
len -= ret;
@@ -1082,7 +1083,7 @@ static int av_encode(AVFormatContext **output_files,
do_video_stats(ost, ist, frame_size);
break;
default:
- abort();
+ av_abort();
}
} else {
/* no reencoding needed : output the packet directly */
@@ -1580,7 +1581,7 @@ void opt_input_file(const char *filename)
frame_rate = rfps;
break;
default:
- abort();
+ av_abort();
}
}
@@ -1611,7 +1612,7 @@ void check_audio_video_inputs(int *has_video_ptr, int *has_audio_ptr)
has_video = 1;
break;
default:
- abort();
+ av_abort();
}
}
}
@@ -1873,7 +1874,7 @@ void prepare_grab(void)
has_video = 1;
break;
default:
- abort();
+ av_abort();
}
}
}