Changeset 386
- Timestamp:
- 05/03/08 00:00:56 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGM.cpp
r381 r386 874 874 // Play through 15% of the video 875 875 int64_t seek = (int64_t)(0.00000015 * (double)format_ctx->duration * fps); 876 int i = 0;877 876 AVPacket packet; 878 877 int have_frame; 879 878 struct SwsContext *toRGB_convert_ctx; 879 880 // Seek to the exact frame we want 881 av_seek_frame(format_ctx, stream, seek, 0); 882 880 883 while (0 <= av_read_frame(format_ctx, &packet)) { 881 884 if (packet.stream_index == stream) { … … 883 886 packet.data, packet.size); 884 887 885 if (have_frame && seek == ++i) {888 if (have_frame) { 886 889 //img_convert((AVPicture *)img_frame, PIX_FMT_RGB24, 887 890 // (AVPicture*)video_frame, codec_ctx->pix_fmt, … … 893 896 sws_flags, NULL, NULL, NULL); 894 897 if (toRGB_convert_ctx == NULL) { 895 av_log(NULL, AV_LOG_ERROR, 896 "Cannot initialize the toRGB conversion context\n"); 897 exit(1); 898 return NS_ERROR_NULL_POINTER; 898 899 } 899 900