Mercurial > mm7
comparison MediaPlayer.cpp @ 2372:7bf6901add4a
Слияние
author | Ritor1 |
---|---|
date | Sun, 01 Jun 2014 15:18:00 +0600 |
parents | 43f29cb2e6ed |
children | 6eb63623cbe8 |
comparison
equal
deleted
inserted
replaced
2370:bbf8a522dcec | 2372:7bf6901add4a |
---|---|
725 fix_wav_header(wav, audio_plain_data.Current()); | 725 fix_wav_header(wav, audio_plain_data.Current()); |
726 #endif*/ | 726 #endif*/ |
727 | 727 |
728 device_buffer = provider->CreateTrack16(audio.dec_ctx->channels, audio.dec_ctx->sample_rate, 2, num_audio_samples, audio_plain_data.Ptr()); | 728 device_buffer = provider->CreateTrack16(audio.dec_ctx->channels, audio.dec_ctx->sample_rate, 2, num_audio_samples, audio_plain_data.Ptr()); |
729 | 729 |
730 ReleaseAvcodec(); | 730 Release(); |
731 return true; | 731 return true; |
732 } | 732 } |
733 } | 733 } |
734 Release(); | 734 Release(); |
735 fprintf(stderr, "ffmpeg: Unable to find stream info\n"); // | 735 fprintf(stderr, "ffmpeg: Unable to find stream info\n"); // |
811 delete decoding_packet; | 811 delete decoding_packet; |
812 avcodec_free_frame(&decoding_frame); | 812 avcodec_free_frame(&decoding_frame); |
813 delete decoding_frame; | 813 delete decoding_frame; |
814 if (last_resampled_frame_data[0]) | 814 if (last_resampled_frame_data[0]) |
815 av_freep(&last_resampled_frame_data[0]); | 815 av_freep(&last_resampled_frame_data[0]); |
816 | |
816 } | 817 } |
817 | 818 |
818 bool Load(const wchar_t *filename, int dst_width, int dst_height, int cache_ms) // | 819 bool Load(const wchar_t *filename, int dst_width, int dst_height, int cache_ms) // |
819 { | 820 { |
820 char filenamea[1024]; | 821 char filenamea[1024]; |
988 memcpy(dst_surface, rescaled_data[0], current_movie_height * rescaled_linesize[0]); | 989 memcpy(dst_surface, rescaled_data[0], current_movie_height * rescaled_linesize[0]); |
989 | 990 |
990 last_resampled_frame_num = desired_frame_number; | 991 last_resampled_frame_num = desired_frame_number; |
991 memcpy(last_resampled_frame_data, rescaled_data, sizeof(rescaled_data)); | 992 memcpy(last_resampled_frame_data, rescaled_data, sizeof(rescaled_data)); |
992 memcpy(last_resampled_frame_linesize, rescaled_linesize, sizeof(rescaled_linesize)); | 993 memcpy(last_resampled_frame_linesize, rescaled_linesize, sizeof(rescaled_linesize)); |
993 // av_freep(&rescaled_data[0]); | 994 //av_freep(&rescaled_data[0]);// |
994 } | 995 } |
995 } | 996 } |
996 else | 997 else |
997 memset(dst_surface, 0, width * current_movie_height * 4); | 998 memset(dst_surface, 0, width * current_movie_height * 4); |
998 | 999 |