Mercurial > libavcodec.hg
comparison mpegvideo.c @ 5850:da358b2602ce libavcodec
Clarify comment block and rewrite in better English.
author | diego |
---|---|
date | Mon, 22 Oct 2007 15:13:10 +0000 |
parents | 0859108b4ae3 |
children | bd9a68cc9a17 |
comparison
equal
deleted
inserted
replaced
5849:c1d42c875be8 | 5850:da358b2602ce |
---|---|
841 if(s->picture[i].data[0]==NULL) return i; | 841 if(s->picture[i].data[0]==NULL) return i; |
842 } | 842 } |
843 } | 843 } |
844 | 844 |
845 av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n"); | 845 av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n"); |
846 /*we could return -1 but the codec would crash anyway, trying to draw | 846 /* We could return -1, but the codec would crash trying to draw into a |
847 into, a non existing frame, this is safer than waiting for a random crash | 847 * non-existing frame anyway. This is safer than waiting for a random crash. |
848 also the return of this is never usefull, a encoder must only allocate | 848 * Also the return of this is never useful, an encoder must only allocate |
849 as many as allowed in the spec which has no relation to how many lavc | 849 * as much as allowed in the specification. This has no relationship to how |
850 could allocate (and MAX_PICTURE_COUNT is always large enough for such | 850 * much libavcodec could allocate (and MAX_PICTURE_COUNT is always large |
851 valid streams) | 851 * enough for such valid streams). |
852 and a decoder has to check stream validity and remove frames if too many | 852 * Plus, a decoder has to check stream validity and remove frames if too |
853 reference frames are around. waiting for "OOM" is not correct at all, it | 853 * many reference frames are around. Waiting for "OOM" is not correct at |
854 similarely has to replace missing reference frames by (interpolated/MC) | 854 * all. Similarly, missing reference frames have to be replaced by |
855 frames anything else is a bug in the codec ... | 855 * interpolated/MC frames, anything else is a bug in the codec ... |
856 */ | 856 */ |
857 abort(); | 857 abort(); |
858 return -1; | 858 return -1; |
859 } | 859 } |
860 | 860 |
861 static void update_noise_reduction(MpegEncContext *s){ | 861 static void update_noise_reduction(MpegEncContext *s){ |