Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 70506 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-18 / +36 lines)
Line 44 Link Here
44
#define __STDC_CONSTANT_MACROS
Line 47 Link Here
48
#include <ffmpeg/avcodec.h>
49
#include <ffmpeg/swscale.h>
50
#include <sys/types.h> /* size_t */
51
#include <sys/errno.h>
Line 55 Link Here
60
static struct SwsContext *img_convert_ctx;
61
Lines 217-229 Link Here
217
#if LIBAVFORMAT_BUILD > 4628
224
218
    img_convert( (AVPicture*)&capture->rgb_picture, PIX_FMT_BGR24,
225
    img_convert_ctx = sws_getContext(capture->video_st->codec->width,
219
                 (AVPicture*)capture->picture,
226
				     capture->video_st->codec->height,
220
                 capture->video_st->codec->pix_fmt,
227
				     capture->video_st->codec->pix_fmt,
221
                 capture->video_st->codec->width,
228
				     capture->video_st->codec->width,
222
                 capture->video_st->codec->height );
229
				     capture->video_st->codec->height,
223
#else
230
				     PIX_FMT_BGR24,
224
    img_convert( (AVPicture*)&capture->rgb_picture, PIX_FMT_BGR24,
231
				     SWS_BICUBIC,
225
                 (AVPicture*)capture->picture,
232
				     NULL, NULL, NULL);
226
                 capture->video_st->codec.pix_fmt,
233
    
227
                 capture->video_st->codec.width,
234
    sws_scale(img_convert_ctx, capture->picture->data, 
228
                 capture->video_st->codec.height );
235
	      capture->picture->linesize, 0,
229
#endif
236
	      capture->video_st->codec->height, 
230
--
237
	      capture->rgb_picture.data, capture->rgb_picture.linesize);
238
    
Lines 716-718 Link Here
716
		if( img_convert((AVPicture *)mywriter->picture, c->pix_fmt,
725
		img_convert_ctx = sws_getContext(image->width,
717
					(AVPicture *)mywriter->rgb_picture, PIX_FMT_BGR24, 
726
						 image->height,
718
					image->width, image->height) < 0){
727
						 PIX_FMT_BGR24,
719
--
728
						 c->width,
729
						 c->height,
730
						 c->pix_fmt,
731
						 SWS_BICUBIC,
732
						 NULL, NULL, NULL);
733
		
734
		if ( sws_scale(img_convert_ctx, mywriter->rgb_picture->data, 
735
			       mywriter->rgb_picture->linesize, 0,
736
			       image->height, 
737
			       mywriter->picture->data, mywriter->picture->linesize) < 0 )
738
		{

Return to bug 70506