Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 9, 2006, 5:28:10 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: compiles again, BUT well…. i do not expect it to run anymore

File:
1 edited

Legend:

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

    r7193 r7203  
    101101
    102102  // Open video file
    103   if (av_open_input_file(&format_context, ResourceManager::getFullName(filename), NULL, 0, NULL) !=0 )
    104   {
    105     PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename));
     103  if (av_open_input_file(&format_context, ResourceManager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )
     104  {
     105    PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename).c_str());
    106106    return false;
    107107  }
     
    110110  if (av_find_stream_info(format_context) < 0)
    111111  {
    112     PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename));
     112    PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename).c_str());
    113113    return false;
    114114  }
     
    116116  // Find the first video stream and take it
    117117  video_stream = av_find_default_stream_index(format_context);
    118  
     118
    119119  if(video_stream == -1)
    120120  {
    121     PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename));
     121    PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename).c_str());
    122122    return false;
    123123  }
     
    202202      // Free the packet that was allocated by av_read_frame
    203203      av_free_packet(&packet);
    204      
     204
    205205      // Did we get a video frame?
    206206      if(frame_finished)
     
    216216          memcpy(&data[i*codec_context->width*3],
    217217                 ((AVPicture*)RGB_frame)->data[0]+i *
    218                  ((AVPicture*)RGB_frame)->linesize[0], 
     218                 ((AVPicture*)RGB_frame)->linesize[0],
    219219                  codec_context->width*sizeof(uint8_t)*3);
    220220
     
    258258  }
    259259  else
    260     return NULL;
    261 }
     260    return 0;
     261}
Note: See TracChangeset for help on using the changeset viewer.