Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2005, 8:34:22 PM (18 years ago)
Author:
hdavid
Message:

branches\avi_play: MoviePlayer works again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/avi_play/src/lib/graphics/importer/media_container.cc

    r6350 r6353  
    125125  buffer=new uint8_t[num_bytes];
    126126
    127   // Assign appropriate parts of buffer to image planes in pFrameRGB
     127  // Assign appropriate parts of buffer to image planes in RGB_frame
    128128  avpicture_fill((AVPicture *)RGB_frame, buffer, PIX_FMT_RGB24, codec_context->width, codec_context->height);
    129129
     
    155155GLuint MediaContainer::getNextFrame()
    156156{
    157   //if (glIsTexture(texture))
    158   //  glDeleteTextures(1, &texture);
    159157
    160158  // get next frame
     
    189187                 ((AVPicture*)RGB_frame)->linesize[0],
    190188                  codec_context->width*sizeof(uint8_t)*3);
     189
     190        //avcodec_flush_buffers(codec_context);
    191191
    192192        surface = SDL_CreateRGBSurfaceFrom(data, codec_context->width,
     
    228228                        GL_UNSIGNED_BYTE,
    229229                        surface->pixels);
    230         glBindTexture(GL_TEXTURE_2D, 0);
     230        glBindTexture(GL_TEXTURE_2D, 0);     
    231231       
    232232        return texture;
     
    235235      {
    236236        av_free_packet(&packet);
    237         this->getNextFrame();
     237        return this->getNextFrame();
    238238      }
    239239    }
     
    241241    {
    242242      av_free_packet(&packet);
    243       this->getNextFrame();
     243      return this->getNextFrame();
    244244    }
    245245  }
Note: See TracChangeset for help on using the changeset viewer.