Merge declaration and initialization.
authorRamiro Polla <ramiro.polla@gmail.com>
Fri, 6 Jun 2008 16:53:01 +0000 (16:53 +0000)
committerRamiro Polla <ramiro.polla@gmail.com>
Fri, 6 Jun 2008 16:53:01 +0000 (16:53 +0000)
Originally committed as revision 13672 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index e7e3128..bab4a3c 100644 (file)
@@ -2496,9 +2496,8 @@ static void truncate_ts(AVStream *st, AVPacket *pkt){
 
 int av_write_frame(AVFormatContext *s, AVPacket *pkt)
 {
-    int ret;
+    int ret = compute_pkt_fields2(s->streams[pkt->stream_index], pkt);
 
-    ret=compute_pkt_fields2(s->streams[pkt->stream_index], pkt);
     if(ret<0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
         return ret;