Changeset f3b93c6
- Timestamp:
- Dec 5, 2013, 3:40:34 PM (11 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 7760b40
- Parents:
- d75e2d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_avcodec.c
rd75e2d5 rf3b93c6 54 54 AVCodecContext *avCodecCtx; 55 55 AVFrame *avFrame; 56 AVPacket avPacket;57 56 AVAudioResampleContext *avr; 58 57 int16_t *output; … … 185 184 AUBIO_ERR("Could not allocate frame for (%s)\n", s->path); 186 185 } 187 AVPacket avPacket = s->avPacket;188 av_init_packet(&avPacket);189 186 190 187 /* allocate output for avr */ … … 197 194 s->avCodecCtx = avCodecCtx; 198 195 s->avFrame = avFrame; 199 s->avPacket = avPacket;200 196 s->avr = avr; 201 197 … … 215 211 AVCodecContext *avCodecCtx = s->avCodecCtx; 216 212 AVFrame *avFrame = s->avFrame; 217 AVPacket avPacket = s->avPacket; 213 AVPacket avPacket; 214 av_init_packet (&avPacket); 218 215 AVAudioResampleContext *avr = s->avr; 219 216 int16_t *output = s->output; … … 263 260 // AUBIO_DBG("%f\n", SHORT_TO_FLOAT(output[i])); 264 261 //} 262 av_free_packet(&avPacket); 265 263 s->avFormatCtx = avFormatCtx; 266 264 s->avCodecCtx = avCodecCtx; 267 265 s->avFrame = avFrame; 268 s->avPacket = avPacket;269 266 s->avr = avr; 270 267 s->output = output; … … 345 342 } 346 343 s->avFrame = NULL; 347 if ( &(s->avPacket) != NULL) {348 av_free_packet( &(s->avPacket) );349 }350 344 if (s->avCodecCtx != NULL) { 351 345 avcodec_close ( s->avCodecCtx );
Note: See TracChangeset
for help on using the changeset viewer.