Mercurial > libavformat.hg
comparison flvenc.c @ 6484:29e95ae56fa9 libavformat
Replace deprecated CODEC_TYPE_AUDIO and CODEC_TYPE_VIDEO with the
corresponding AVMEDIA_TYPE_* symbols.
author | stefano |
---|---|
date | Sat, 25 Sep 2010 23:27:16 +0000 |
parents | ae4ea19af762 |
children |
comparison
equal
deleted
inserted
replaced
6483:ac299df18642 | 6484:29e95ae56fa9 |
---|---|
335 int i; | 335 int i; |
336 | 336 |
337 /* Add EOS tag */ | 337 /* Add EOS tag */ |
338 for (i = 0; i < s->nb_streams; i++) { | 338 for (i = 0; i < s->nb_streams; i++) { |
339 AVCodecContext *enc = s->streams[i]->codec; | 339 AVCodecContext *enc = s->streams[i]->codec; |
340 if (enc->codec_type == CODEC_TYPE_VIDEO && | 340 if (enc->codec_type == AVMEDIA_TYPE_VIDEO && |
341 enc->codec_id == CODEC_ID_H264) { | 341 enc->codec_id == CODEC_ID_H264) { |
342 put_avc_eos_tag(pb, flv->last_video_ts); | 342 put_avc_eos_tag(pb, flv->last_video_ts); |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
403 if (!flv->delay && pkt->dts < 0) | 403 if (!flv->delay && pkt->dts < 0) |
404 flv->delay = -pkt->dts; | 404 flv->delay = -pkt->dts; |
405 } | 405 } |
406 | 406 |
407 ts = pkt->dts + flv->delay; // add delay to force positive dts | 407 ts = pkt->dts + flv->delay; // add delay to force positive dts |
408 if (enc->codec_type == CODEC_TYPE_VIDEO) { | 408 if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
409 if (flv->last_video_ts < ts) | 409 if (flv->last_video_ts < ts) |
410 flv->last_video_ts = ts; | 410 flv->last_video_ts = ts; |
411 } | 411 } |
412 put_be24(pb,size + flags_size); | 412 put_be24(pb,size + flags_size); |
413 put_be24(pb,ts); | 413 put_be24(pb,ts); |