Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
havlenapetr committed Aug 3, 2010
1 parent fdf11fc commit 0a1e72f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
15 changes: 0 additions & 15 deletions jni/libmediaplayer/mediaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,10 @@ status_t MediaPlayer::prepareVideo()
if (avcodec_open(mFFmpegStorage.video.codec_ctx, mFFmpegStorage.video.codec) < 0) {
return INVALID_OPERATION;
}
// Allocate video frame
mFFmpegStorage.pFrame = avcodec_alloc_frame();

mVideoWidth = mFFmpegStorage.video.codec_ctx->width;
mVideoHeight = mFFmpegStorage.video.codec_ctx->height;
mDuration = mFFmpegStorage.pFormatCtx->duration;
mFFmpegStorage.img_convert_ctx = sws_getContext(mVideoWidth,
mVideoHeight,
mFFmpegStorage.video.codec_ctx->pix_fmt,
mVideoWidth,
mVideoHeight,
PIX_FMT_RGB565,
SWS_POINT,
NULL,
NULL,
NULL);

return NO_ERROR;
}
Expand Down Expand Up @@ -191,9 +179,6 @@ status_t MediaPlayer::suspend() {

__android_log_print(ANDROID_LOG_ERROR, TAG, "suspended");

// Free the YUV frame
av_free(mFFmpegStorage.pFrame);

// Close the codec
avcodec_close(mFFmpegStorage.video.codec_ctx);
avcodec_close(mFFmpegStorage.audio.codec_ctx);
Expand Down
2 changes: 0 additions & 2 deletions jni/libmediaplayer/mediaplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ class MediaPlayer

// ffmpeg store struct
struct ffmpeg_fields_t {
AVFrame *pFrame;
AVFormatContext *pFormatCtx;
struct SwsContext *img_convert_ctx;
struct ffmpeg_video_t video;
struct ffmpeg_audio_t audio;
} mFFmpegStorage;
Expand Down

0 comments on commit 0a1e72f

Please sign in to comment.