diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-03-26 21:56:58 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2020-04-08 23:02:39 +0800 |
commit | 73dc87c4f07f82b9756b3bbf4d4e9f18e46ef2e3 (patch) | |
tree | a510a0695cdaa02bc177d7c5b799eb28ea400d17 /libavformat/hlsplaylist.c | |
parent | e2e8ef5076bfe20d70c98bed9f142bc4b94c1e2d (diff) | |
download | ffmpeg-73dc87c4f07f82b9756b3bbf4d4e9f18e46ef2e3.tar.gz |
avformat/hlsplaylist: simplify code for checking whether the string is empty
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavformat/hlsplaylist.c')
-rw-r--r-- | libavformat/hlsplaylist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/hlsplaylist.c b/libavformat/hlsplaylist.c index 9cbd02353f..56244496c0 100644 --- a/libavformat/hlsplaylist.c +++ b/libavformat/hlsplaylist.c @@ -65,11 +65,11 @@ void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, if (st && st->codecpar->width > 0 && st->codecpar->height > 0) avio_printf(out, ",RESOLUTION=%dx%d", st->codecpar->width, st->codecpar->height); - if (codecs && strlen(codecs) > 0) + if (codecs && codecs[0]) avio_printf(out, ",CODECS=\"%s\"", codecs); - if (agroup && strlen(agroup) > 0) + if (agroup && agroup[0]) avio_printf(out, ",AUDIO=\"group_%s\"", agroup); - if (ccgroup && strlen(ccgroup) > 0) + if (ccgroup && ccgroup[0]) avio_printf(out, ",CLOSED-CAPTIONS=\"%s\"", ccgroup); avio_printf(out, "\n%s\n\n", filename); } |