mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-29 02:33:04 +00:00
avplay: K&R cleanup
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
60d626650a
commit
da7c65f0ce
14
avplay.c
14
avplay.c
@ -874,7 +874,8 @@ static void video_audio_display(VideoState *s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int video_open(VideoState *is){
|
static int video_open(VideoState *is)
|
||||||
|
{
|
||||||
int flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
|
int flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
|
||||||
int w,h;
|
int w,h;
|
||||||
|
|
||||||
@ -1207,7 +1208,8 @@ retry:
|
|||||||
if (is->audio_st && is->video_st)
|
if (is->audio_st && is->video_st)
|
||||||
av_diff = get_audio_clock(is) - get_video_clock(is);
|
av_diff = get_audio_clock(is) - get_video_clock(is);
|
||||||
printf("%7.2f A-V:%7.3f s:%3.1f aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r",
|
printf("%7.2f A-V:%7.3f s:%3.1f aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r",
|
||||||
get_master_clock(is), av_diff, FFMAX(is->skip_frames-1, 0), aqsize / 1024, vqsize / 1024, sqsize, is->pts_ctx.num_faulty_dts, is->pts_ctx.num_faulty_pts);
|
get_master_clock(is), av_diff, FFMAX(is->skip_frames - 1, 0), aqsize / 1024,
|
||||||
|
vqsize / 1024, sqsize, is->pts_ctx.num_faulty_dts, is->pts_ctx.num_faulty_pts);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
last_time = cur_time;
|
last_time = cur_time;
|
||||||
}
|
}
|
||||||
@ -1810,7 +1812,8 @@ static int video_thread(void *arg)
|
|||||||
ret = get_video_frame(is, frame, &pts_int, &pkt);
|
ret = get_video_frame(is, frame, &pts_int, &pkt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret < 0) goto the_end;
|
if (ret < 0)
|
||||||
|
goto the_end;
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
continue;
|
continue;
|
||||||
@ -2180,9 +2183,7 @@ static int stream_component_open(VideoState *is, int stream_index)
|
|||||||
avctx->debug = debug;
|
avctx->debug = debug;
|
||||||
avctx->workaround_bugs = workaround_bugs;
|
avctx->workaround_bugs = workaround_bugs;
|
||||||
avctx->lowres = lowres;
|
avctx->lowres = lowres;
|
||||||
if(lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
|
||||||
avctx->idct_algo = idct;
|
avctx->idct_algo = idct;
|
||||||
if(fast) avctx->flags2 |= CODEC_FLAG2_FAST;
|
|
||||||
avctx->skip_frame = skip_frame;
|
avctx->skip_frame = skip_frame;
|
||||||
avctx->skip_idct = skip_idct;
|
avctx->skip_idct = skip_idct;
|
||||||
avctx->skip_loop_filter = skip_loop_filter;
|
avctx->skip_loop_filter = skip_loop_filter;
|
||||||
@ -2190,6 +2191,9 @@ static int stream_component_open(VideoState *is, int stream_index)
|
|||||||
avctx->error_concealment = error_concealment;
|
avctx->error_concealment = error_concealment;
|
||||||
avctx->thread_count = thread_count;
|
avctx->thread_count = thread_count;
|
||||||
|
|
||||||
|
if (lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||||
|
if (fast) avctx->flags2 |= CODEC_FLAG2_FAST;
|
||||||
|
|
||||||
if (!codec ||
|
if (!codec ||
|
||||||
avcodec_open2(avctx, codec, &opts) < 0)
|
avcodec_open2(avctx, codec, &opts) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user