X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fflicvideo.c;h=e57688fe415747a19171a5b34bc97ed0eef4e358;hb=e5a389a1b70a32a56aa83377e88bf718251aa8f0;hp=b2e5316f028d9dfacaec9f233dbbb06852862d56;hpb=2029f312e8c13b25d322d69961b42db2e66f616a;p=ffmpeg diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c index b2e5316f028..e57688fe415 100644 --- a/libavcodec/flicvideo.c +++ b/libavcodec/flicvideo.c @@ -17,7 +17,6 @@ * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * */ /** @@ -579,20 +578,18 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx, } /* Now FLX is strange, in that it is "byte" as opposed to "pixel" run length compressed. - * This doesnt give us any good oportunity to perform word endian conversion - * during decompression. So if its requried (ie, this isnt a LE target, we do + * This does not give us any good oportunity to perform word endian conversion + * during decompression. So if it is required (i.e., this is not a LE target, we do * a second pass over the line here, swapping the bytes. */ - pixel = 0xFF00; - if (0xFF00 != AV_RL16(&pixel)) /* Check if its not an LE Target */ - { - pixel_ptr = y_ptr; - pixel_countdown = s->avctx->width; - while (pixel_countdown > 0) { +#ifdef WORDS_BIGENDIAN + pixel_ptr = y_ptr; + pixel_countdown = s->avctx->width; + while (pixel_countdown > 0) { *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[pixel_ptr]); pixel_ptr += 2; - } } +#endif y_ptr += s->frame.linesize[0]; } break; @@ -716,11 +713,11 @@ static int flic_decode_frame(AVCodecContext *avctx, buf, buf_size); } - /* Shouldnt get here, ever as the pix_fmt is processed */ + /* Should not get here, ever as the pix_fmt is processed */ /* in flic_decode_init and the above if should deal with */ /* the finite set of possibilites allowable by here. */ - /* but in case we do, just error out. */ - av_log(avctx, AV_LOG_ERROR, "Unknown Format of FLC. My Science cant explain how this happened\n"); + /* But in case we do, just error out. */ + av_log(avctx, AV_LOG_ERROR, "Unknown FLC format, my science cannot explain how this happened.\n"); return -1; }