mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
recommit of
* backing out the 0-sized packets patch. We have to devise a more sensible approach. orginal commit by roman shaposhnik Originally committed as revision 2379 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
002936777b
commit
fe08925f64
8
ffmpeg.c
8
ffmpeg.c
@ -1256,8 +1256,8 @@ static int av_encode(AVFormatContext **output_files,
|
|||||||
|
|
||||||
len = pkt.size;
|
len = pkt.size;
|
||||||
ptr = pkt.data;
|
ptr = pkt.data;
|
||||||
do {
|
while (len > 0) {
|
||||||
/* decode the packet if needed */
|
/* decode the packet if needed */
|
||||||
data_buf = NULL; /* fail safe */
|
data_buf = NULL; /* fail safe */
|
||||||
data_size = 0;
|
data_size = 0;
|
||||||
if (ist->decoding_needed) {
|
if (ist->decoding_needed) {
|
||||||
@ -1314,7 +1314,7 @@ static int av_encode(AVFormatContext **output_files,
|
|||||||
av_free_packet(&pkt);
|
av_free_packet(&pkt);
|
||||||
goto redo;
|
goto redo;
|
||||||
}
|
}
|
||||||
if (len != 0 && !got_picture) {
|
if (!got_picture) {
|
||||||
/* no picture yet */
|
/* no picture yet */
|
||||||
ptr += ret;
|
ptr += ret;
|
||||||
len -= ret;
|
len -= ret;
|
||||||
@ -1431,7 +1431,7 @@ static int av_encode(AVFormatContext **output_files,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
av_free(buffer_to_free);
|
av_free(buffer_to_free);
|
||||||
} while (len > 0);
|
}
|
||||||
discard_packet:
|
discard_packet:
|
||||||
av_free_packet(&pkt);
|
av_free_packet(&pkt);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user