You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Replace invocations of av_fifo_realloc(), which is going to be
deprecated, with corresponding invocations of av_fifo_realloc2(). Originally committed as revision 14848 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
5
ffmpeg.c
5
ffmpeg.c
@@ -644,7 +644,10 @@ static void do_audio_out(AVFormatContext *s,
|
|||||||
/* now encode as many frames as possible */
|
/* now encode as many frames as possible */
|
||||||
if (enc->frame_size > 1) {
|
if (enc->frame_size > 1) {
|
||||||
/* output resampled raw samples */
|
/* output resampled raw samples */
|
||||||
av_fifo_realloc(&ost->fifo, av_fifo_size(&ost->fifo) + size_out);
|
if (av_fifo_realloc2(&ost->fifo, av_fifo_size(&ost->fifo) + size_out) < 0) {
|
||||||
|
fprintf(stderr, "av_fifo_realloc2() failed\n");
|
||||||
|
av_exit(1);
|
||||||
|
}
|
||||||
av_fifo_generic_write(&ost->fifo, buftmp, size_out, NULL);
|
av_fifo_generic_write(&ost->fifo, buftmp, size_out, NULL);
|
||||||
|
|
||||||
frame_bytes = enc->frame_size * 2 * enc->channels;
|
frame_bytes = enc->frame_size * 2 * enc->channels;
|
||||||
|
@@ -1170,7 +1170,8 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
|
|||||||
stream->predecode_packet= pkt_desc;
|
stream->predecode_packet= pkt_desc;
|
||||||
stream->next_packet= &pkt_desc->next;
|
stream->next_packet= &pkt_desc->next;
|
||||||
|
|
||||||
av_fifo_realloc(&stream->fifo, av_fifo_size(&stream->fifo) + size);
|
if (av_fifo_realloc2(&stream->fifo, av_fifo_size(&stream->fifo) + size) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (s->is_dvd){
|
if (s->is_dvd){
|
||||||
if (is_iframe && (s->packet_number == 0 || (pts - stream->vobu_start_pts >= 36000))) { // min VOBU length 0.4 seconds (mpucoder)
|
if (is_iframe && (s->packet_number == 0 || (pts - stream->vobu_start_pts >= 36000))) { // min VOBU length 0.4 seconds (mpucoder)
|
||||||
|
Reference in New Issue
Block a user