Changeset 6353 in orxonox.OLD for branches/avi_play/src/lib/graphics/importer/media_container.cc
- Timestamp:
- Dec 30, 2005, 8:34:22 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/avi_play/src/lib/graphics/importer/media_container.cc
r6350 r6353 125 125 buffer=new uint8_t[num_bytes]; 126 126 127 // Assign appropriate parts of buffer to image planes in pFrameRGB127 // Assign appropriate parts of buffer to image planes in RGB_frame 128 128 avpicture_fill((AVPicture *)RGB_frame, buffer, PIX_FMT_RGB24, codec_context->width, codec_context->height); 129 129 … … 155 155 GLuint MediaContainer::getNextFrame() 156 156 { 157 //if (glIsTexture(texture))158 // glDeleteTextures(1, &texture);159 157 160 158 // get next frame … … 189 187 ((AVPicture*)RGB_frame)->linesize[0], 190 188 codec_context->width*sizeof(uint8_t)*3); 189 190 //avcodec_flush_buffers(codec_context); 191 191 192 192 surface = SDL_CreateRGBSurfaceFrom(data, codec_context->width, … … 228 228 GL_UNSIGNED_BYTE, 229 229 surface->pixels); 230 glBindTexture(GL_TEXTURE_2D, 0); 230 glBindTexture(GL_TEXTURE_2D, 0); 231 231 232 232 return texture; … … 235 235 { 236 236 av_free_packet(&packet); 237 this->getNextFrame();237 return this->getNextFrame(); 238 238 } 239 239 } … … 241 241 { 242 242 av_free_packet(&packet); 243 this->getNextFrame();243 return this->getNextFrame(); 244 244 } 245 245 }
Note: See TracChangeset
for help on using the changeset viewer.