aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-09-11 18:20:20 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-09-11 21:41:56 +0200
commit976bb42acab6b506acec29844e8ccabeafbcede9 (patch)
treefb53bf26f8fdc6930ca9af928d7de88f1e30b63f /doc
parentbdd9bfbbab1bd8aee2155a7ac9b12d090fe41ad8 (diff)
downloadffmpeg-976bb42acab6b506acec29844e8ccabeafbcede9.tar.gz
examples/muxing: merge some declarations and definitions
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/muxing.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index bc802e874d..20f6bd6c9b 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -239,9 +239,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, AVCodec **codec,
static void open_video(AVFormatContext *oc, AVCodec *codec, AVStream *st)
{
int ret;
- AVCodecContext *c;
-
- c = st->codec;
+ AVCodecContext *c = st->codec;
/* open the codec */
if (avcodec_open2(c, codec, NULL) < 0) {
@@ -315,10 +313,8 @@ static void fill_yuv_image(AVPicture *pict, int frame_index,
static void write_video_frame(AVFormatContext *oc, AVStream *st)
{
int ret;
- AVCodecContext *c;
static struct SwsContext *img_convert_ctx;
-
- c = st->codec;
+ AVCodecContext *c = st->codec;
if (frame_count >= STREAM_NB_FRAMES) {
/* No more frames to compress. The codec has a latency of a few