Commit fe08925f authored by Michael Niedermayer's avatar Michael Niedermayer

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
parent 00293677
......@@ -1256,7 +1256,7 @@ static int av_encode(AVFormatContext **output_files,
len = pkt.size;
ptr = pkt.data;
do {
while (len > 0) {
/* decode the packet if needed */
data_buf = NULL; /* fail safe */
data_size = 0;
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment