"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "avplay.c" between
libav-12.tar.gz and libav-12.1.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

avplay.c  (libav-12):avplay.c  (libav-12.1)
skipping to change at line 216 skipping to change at line 216
SDL_cond *pictq_cond; SDL_cond *pictq_cond;
// QETimer *video_timer; // QETimer *video_timer;
char filename[1024]; char filename[1024];
int width, height, xleft, ytop; int width, height, xleft, ytop;
PtsCorrectionContext pts_ctx; PtsCorrectionContext pts_ctx;
AVFilterContext *in_video_filter; // the first filter in the video chain AVFilterContext *in_video_filter; // the first filter in the video chain
AVFilterContext *out_video_filter; // the last filter in the video chain AVFilterContext *out_video_filter; // the last filter in the video chain
SDL_mutex *video_filter_mutex;
float skip_frames; float skip_frames;
float skip_frames_index; float skip_frames_index;
int refresh; int refresh;
SpecifierOpt *codec_names; SpecifierOpt *codec_names;
int nb_codec_names; int nb_codec_names;
} PlayerState; } PlayerState;
/* options specified by the user */ /* options specified by the user */
skipping to change at line 1201 skipping to change at line 1202
SDL_WaitThread(is->refresh_tid, NULL); SDL_WaitThread(is->refresh_tid, NULL);
/* free all pictures */ /* free all pictures */
for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) {
vp = &is->pictq[i]; vp = &is->pictq[i];
if (vp->bmp) { if (vp->bmp) {
SDL_FreeYUVOverlay(vp->bmp); SDL_FreeYUVOverlay(vp->bmp);
vp->bmp = NULL; vp->bmp = NULL;
} }
} }
SDL_DestroyMutex(is->video_filter_mutex);
SDL_DestroyMutex(is->pictq_mutex); SDL_DestroyMutex(is->pictq_mutex);
SDL_DestroyCond(is->pictq_cond); SDL_DestroyCond(is->pictq_cond);
SDL_DestroyMutex(is->subpq_mutex); SDL_DestroyMutex(is->subpq_mutex);
SDL_DestroyCond(is->subpq_cond); SDL_DestroyCond(is->subpq_cond);
} }
static void do_exit(void) static void do_exit(void)
{ {
if (player) { if (player) {
player_close(player); player_close(player);
skipping to change at line 1614 skipping to change at line 1616
} }
if (ret < 0) if (ret < 0)
goto the_end; goto the_end;
if (step) if (step)
if (player) if (player)
stream_pause(player); stream_pause(player);
} }
the_end: the_end:
SDL_LockMutex(is->video_filter_mutex);
is->out_video_filter = NULL;
SDL_UnlockMutex(is->video_filter_mutex);
av_freep(&vfilters); av_freep(&vfilters);
avfilter_graph_free(&graph); avfilter_graph_free(&graph);
av_packet_unref(&pkt); av_packet_unref(&pkt);
av_frame_free(&frame); av_frame_free(&frame);
return 0; return 0;
} }
static int subtitle_thread(void *arg) static int subtitle_thread(void *arg)
{ {
PlayerState *is = arg; PlayerState *is = arg;
skipping to change at line 2549 skipping to change at line 2554
av_strlcpy(is->filename, filename, sizeof(is->filename)); av_strlcpy(is->filename, filename, sizeof(is->filename));
is->iformat = iformat; is->iformat = iformat;
is->ytop = 0; is->ytop = 0;
is->xleft = 0; is->xleft = 0;
if ((ret = stream_setup(is)) < 0) { if ((ret = stream_setup(is)) < 0) {
return ret; return ret;
} }
is->video_filter_mutex = SDL_CreateMutex();
/* start video display */ /* start video display */
is->pictq_mutex = SDL_CreateMutex(); is->pictq_mutex = SDL_CreateMutex();
is->pictq_cond = SDL_CreateCond(); is->pictq_cond = SDL_CreateCond();
is->subpq_mutex = SDL_CreateMutex(); is->subpq_mutex = SDL_CreateMutex();
is->subpq_cond = SDL_CreateCond(); is->subpq_cond = SDL_CreateCond();
is->av_sync_type = av_sync_type; is->av_sync_type = av_sync_type;
is->refresh_tid = SDL_CreateThread(refresh_thread, is); is->refresh_tid = SDL_CreateThread(refresh_thread, is);
if (!is->refresh_tid) if (!is->refresh_tid)
skipping to change at line 2823 skipping to change at line 2830
SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCB LIT|SDL_HWACCEL); SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCB LIT|SDL_HWACCEL);
screen_width = player->width = event.resize.w; screen_width = player->width = event.resize.w;
screen_height = player->height = event.resize.h; screen_height = player->height = event.resize.h;
} }
break; break;
case SDL_QUIT: case SDL_QUIT:
case FF_QUIT_EVENT: case FF_QUIT_EVENT:
do_exit(); do_exit();
break; break;
case FF_ALLOC_EVENT: case FF_ALLOC_EVENT:
video_open(event.user.data1); SDL_LockMutex(player->video_filter_mutex);
alloc_picture(event.user.data1); if (player->out_video_filter) {
video_open(event.user.data1);
alloc_picture(event.user.data1);
}
SDL_UnlockMutex(player->video_filter_mutex);
break; break;
case FF_REFRESH_EVENT: case FF_REFRESH_EVENT:
video_refresh_timer(event.user.data1); video_refresh_timer(event.user.data1);
player->refresh = 0; player->refresh = 0;
break; break;
default: default:
break; break;
} }
} }
} }
 End of changes. 5 change blocks. 
2 lines changed or deleted 13 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS