[FFmpeg-devel] [PATCH] ffprobe: add writer_print_rational()
Clément Bœsch
ubitux at gmail.com
Fri Jun 15 00:08:03 CEST 2012
On Fri, Jun 15, 2012 at 12:05:57AM +0200, Clément Bœsch wrote:
[...]
> > @@ -1580,9 +1592,7 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream)
> > if (s) print_str ("pix_fmt", s);
> > else print_str_opt("pix_fmt", "unknown");
> > if (frame->sample_aspect_ratio.num) {
> > - print_fmt("sample_aspect_ratio", "%d:%d",
> > - frame->sample_aspect_ratio.num,
> > - frame->sample_aspect_ratio.den);
> > + print_q("sample_aspect_ratio", frame->sample_aspect_ratio, ':');
>
> Not related but since I like to parasite threads: is there any reason not
> to use av_guess_sample_aspect_ratio() here? Derek recently complained
> about that information not being raised properly with a MOV.
>
Actually I was refering to...
> > } else {
> > print_str_opt("sample_aspect_ratio", "N/A");
> > }
> > @@ -1710,7 +1720,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
> > s = av_get_media_type_string(dec_ctx->codec_type);
> > if (s) print_str ("codec_type", s);
> > else print_str_opt("codec_type", "unknown");
> > - print_fmt("codec_time_base", "%d/%d", dec_ctx->time_base.num, dec_ctx->time_base.den);
> > + print_q("codec_time_base", dec_ctx->time_base, '/');
> >
> > /* print AVI/FourCC tag */
> > av_get_codec_tag_string(val_str, sizeof(val_str), dec_ctx->codec_tag);
> > @@ -1723,16 +1733,12 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
> > print_int("height", dec_ctx->height);
> > print_int("has_b_frames", dec_ctx->has_b_frames);
> > if (dec_ctx->sample_aspect_ratio.num) {
> > - print_fmt("sample_aspect_ratio", "%d:%d",
> > - dec_ctx->sample_aspect_ratio.num,
> > - dec_ctx->sample_aspect_ratio.den);
> > + print_q("sample_aspect_ratio", dec_ctx->sample_aspect_ratio, ':');
...this one.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120615/697f3c40/attachment.asc>
More information about the ffmpeg-devel
mailing list