aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-14 14:36:58 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-14 14:36:58 +0000
commitfe08925f64c1a891396c726f2e514d02d8997e5b (patch)
treed1ce61890a35842290d0b40cf3fb19b465a235a2 /ffmpeg.c
parent002936777bb525704efe3e5adc7e5a83c0b5d21f (diff)
downloadffmpeg-fe08925f64c1a891396c726f2e514d02d8997e5b.tar.gz
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
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index cf2f7b974b..c5239d4a46 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1256,8 +1256,8 @@ static int av_encode(AVFormatContext **output_files,
len = pkt.size;
ptr = pkt.data;
- do {
- /* decode the packet if needed */
+ while (len > 0) {
+ /* decode the packet if needed */
data_buf = NULL; /* fail safe */
data_size = 0;
if (ist->decoding_needed) {
@@ -1314,7 +1314,7 @@ static int av_encode(AVFormatContext **output_files,
av_free_packet(&pkt);
goto redo;
}
- if (len != 0 && !got_picture) {
+ if (!got_picture) {
/* no picture yet */
ptr += ret;
len -= ret;
@@ -1431,7 +1431,7 @@ static int av_encode(AVFormatContext **output_files,
}
}
av_free(buffer_to_free);
- } while (len > 0);
+ }
discard_packet:
av_free_packet(&pkt);