Skip to content

Commit

Permalink
fix for pix format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tkirby committed May 8, 2009
1 parent 97330d2 commit 6c9713f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ffmpeg_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ FFMPEG_PHP_METHOD(ffmpeg_frame, toGDImage)

GET_FRAME_RESOURCE(getThis(), ff_frame);

_php_convert_frame(ff_frame, PIX_FMT_RGBA32);
_php_convert_frame(ff_frame, PIX_FMT_BGRA);

return_value->value.lval = _php_get_gd_image(ff_frame->width,
ff_frame->height);
Expand Down Expand Up @@ -418,7 +418,7 @@ FFMPEG_PHP_METHOD(ffmpeg_frame, ffmpeg_frame)

/* create a an av_frame and allocate space for it */
frame = avcodec_alloc_frame();
avpicture_alloc((AVPicture*)frame, PIX_FMT_RGBA32, width, height);
avpicture_alloc((AVPicture*)frame, PIX_FMT_BGRA, width, height);

/* copy the gd image to the av_frame */
_php_gd_image_to_avframe(gd_img, frame, width, height);
Expand All @@ -429,7 +429,7 @@ FFMPEG_PHP_METHOD(ffmpeg_frame, ffmpeg_frame)
/* set the ffpmeg_frame's properties */
ff_frame->width = width;
ff_frame->height = height;
ff_frame->pixel_format = PIX_FMT_RGBA32;
ff_frame->pixel_format = PIX_FMT_BGRA;
break;
default:
zend_error(E_ERROR, "Invalid argument\n");
Expand Down

0 comments on commit 6c9713f

Please sign in to comment.