Skip to content

Commit

Permalink
cosmetic update
Browse files Browse the repository at this point in the history
  • Loading branch information
havlenapetr committed Jul 17, 2010
1 parent a3359d1 commit 3421758
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,18 @@ static void FFMpegPlayerAndroid_play(JNIEnv *env, jobject obj, jobject bitmap) {
int result = -1;
int samples_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
int16_t* samples;
AVFrame* pFrameRGB;

// Allocate an AVFrame structure
AVFrame *pFrameRGB = FFMpegPlayerAndroid_createFrame(env);
if(ffmpeg_video.initzialized) {
pFrameRGB = FFMpegPlayerAndroid_createFrame(env);
if (pFrameRGB == NULL) {
jniThrowException(env,
"java/io/IOException",
"Couldn't crate frame buffer");
return;
}
}

if(ffmpeg_audio.initzialized) {
samples = (int16_t *) av_malloc(samples_size);
Expand Down
2 changes: 0 additions & 2 deletions src/com/media/ffmpeg/android/FFMpegPlayerAndroid.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class FFMpegPlayerAndroid extends SurfaceView {
private boolean mPlaying;
private Bitmap mBitmap;
private FFMpegAVFormatContext mInputVideo;
private boolean mFitToScreen;

public FFMpegPlayerAndroid(Context context) {
super(context);
Expand All @@ -69,7 +68,6 @@ public FFMpegPlayerAndroid(Context context, AttributeSet attrs, int defStyle) {

private void initVideoView(Context context) {
mContext = context;
mFitToScreen = true;
getHolder().addCallback(mSHCallback);
}

Expand Down

0 comments on commit 3421758

Please sign in to comment.