int i;
int i_width;
int i_height;
- int i_aspect;
int result = 0;
/* Only when selected */
fmt.video.i_height = p_sys->height = encoded_size.height;
if( par_size.width != encoded_size.width )
{
- fmt.video.i_aspect = par_size.width * VOUT_ASPECT_FACTOR / encoded_size.width ;
+ fmt.video.i_sar_num = (int64_t)encoded_size.height * par_size.width / encoded_size.width;
+ fmt.video.i_sar_den = encoded_size.width;
}
NSLog( @"encoded_size %d %d", (int)encoded_size.width, (int)encoded_size.height );
* Else we dead lock. */
if( vlc_object_alive(p_this->p_libvlc))
{
- [p_sys->session stopRunning];
- [p_sys->output release];
- [p_sys->session release];
+ // Perform this on main thread, as the framework itself will sometimes try to synchronously
+ // work on main thread. And this will create a dead lock.
+ [p_sys->session performSelectorOnMainThread:@selector(stopRunning) withObject:nil waitUntilDone:NO];
+ [p_sys->output performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
+ [p_sys->session performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
}
free( p_sys );