Commit 7e4602a4 authored by diego's avatar diego

Clarify comment block and rewrite in better English.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10837 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4ebbecfd
...@@ -843,17 +843,17 @@ int ff_find_unused_picture(MpegEncContext *s, int shared){ ...@@ -843,17 +843,17 @@ int ff_find_unused_picture(MpegEncContext *s, int shared){
} }
av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n"); av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n");
/*we could return -1 but the codec would crash anyway, trying to draw /* We could return -1, but the codec would crash trying to draw into a
into, a non existing frame, this is safer than waiting for a random crash * non-existing frame anyway. This is safer than waiting for a random crash.
also the return of this is never usefull, a encoder must only allocate * Also the return of this is never useful, an encoder must only allocate
as many as allowed in the spec which has no relation to how many lavc * as much as allowed in the specification. This has no relationship to how
could allocate (and MAX_PICTURE_COUNT is always large enough for such * much libavcodec could allocate (and MAX_PICTURE_COUNT is always large
valid streams) * enough for such valid streams).
and a decoder has to check stream validity and remove frames if too many * Plus, a decoder has to check stream validity and remove frames if too
reference frames are around. waiting for "OOM" is not correct at all, it * many reference frames are around. Waiting for "OOM" is not correct at
similarely has to replace missing reference frames by (interpolated/MC) * all. Similarly, missing reference frames have to be replaced by
frames anything else is a bug in the codec ... * interpolated/MC frames, anything else is a bug in the codec ...
*/ */
abort(); abort();
return -1; return -1;
} }
......
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