[FFmpeg-cvslog] lavf: Declare an AVRational struct without a struct literal

Martin Storsjö git at videolan.org
Mon Aug 6 22:29:39 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sun Aug  5 22:55:21 2012 +0300| [6c071a2b389578b0607b4d4356520a43fac4b3bc] | committer: Martin Storsjö

lavf: Declare an AVRational struct without a struct literal

At this place, the normal way of initializing a struct works
fine, there's no need for a struct literal.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c071a2b389578b0607b4d4356520a43fac4b3bc
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3630c6f..5b26c59 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2499,7 +2499,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                 /* round guessed framerate to a "standard" framerate if it's
                  * within 1% of the original estimate*/
                 for (j = 1; j < MAX_STD_TIMEBASES; j++) {
-                    AVRational std_fps = (AVRational){get_std_framerate(j), 12*1001};
+                    AVRational std_fps = { get_std_framerate(j), 12*1001 };
                     double error = fabs(av_q2d(st->avg_frame_rate) / av_q2d(std_fps) - 1);
 
                     if (error < best_error) {



More information about the ffmpeg-cvslog mailing list