- pic->reference= 0;
- if(avctx->get_buffer(avctx, pic) < 0)
- return -1;
-
- ydst= (uint16_t *)pic->data[0];
- udst= (uint16_t *)pic->data[1];
- vdst= (uint16_t *)pic->data[2];
- yend= ydst + width;
- pic->pict_type= FF_I_TYPE;
- pic->key_frame= 1;
-
- for(;;){
- uint32_t v= be2me_32(*src++);
- *udst++= (v>>16) & 0xFFC0;
- *ydst++= (v>>6 ) & 0xFFC0;
- *vdst++= (v<<4 ) & 0xFFC0;
-
- v= be2me_32(*src++);
- *ydst++= (v>>16) & 0xFFC0;
-
- if(ydst >= yend){
- ydst+= pic->linesize[0]/2 - width;
- udst+= pic->linesize[1]/2 - width/2;
- vdst+= pic->linesize[2]/2 - width/2;
- yend= ydst + width;
- if(++y >= avctx->height)
+ if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
+ return ret;
+
+ ydst = (uint16_t *)pic->data[0];
+ udst = (uint16_t *)pic->data[1];
+ vdst = (uint16_t *)pic->data[2];
+ yend = ydst + width;
+ pic->pict_type = AV_PICTURE_TYPE_I;
+ pic->key_frame = 1;
+
+ for (;;) {
+ uint32_t v = av_be2ne32(*src++);
+ *udst++ = (v >> 16) & 0xFFC0;
+ *ydst++ = (v >> 6 ) & 0xFFC0;
+ *vdst++ = (v << 4 ) & 0xFFC0;
+
+ v = av_be2ne32(*src++);
+ *ydst++ = (v >> 16) & 0xFFC0;
+
+ if (ydst >= yend) {
+ ydst += pic->linesize[0] / 2 - width;
+ udst += pic->linesize[1] / 2 - width / 2;
+ vdst += pic->linesize[2] / 2 - width / 2;
+ yend = ydst + width;
+ if (++y >= avctx->height)