diff mbox

[FFmpeg-devel,1/2] avformat/wavenc: replace literal numbers with enum constants

Message ID 1506697696-21235-1-git-send-email-t.rapp@noa-archive.com
State Accepted
Commit c941e99b7f7ba16230aa72e644d519c33004dd47
Headers show

Commit Message

Tobias Rapp Sept. 29, 2017, 3:08 p.m. UTC
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
---
 libavformat/wavenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Michael Niedermayer Sept. 30, 2017, 12:44 a.m. UTC | #1
On Fri, Sep 29, 2017 at 05:08:15PM +0200, Tobias Rapp wrote:
> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
> ---
>  libavformat/wavenc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

LGTM

thx

[...]
Tobias Rapp Oct. 5, 2017, 7:57 a.m. UTC | #2
On 30.09.2017 02:44, Michael Niedermayer wrote:
> On Fri, Sep 29, 2017 at 05:08:15PM +0200, Tobias Rapp wrote:
>> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
>> ---
>>   libavformat/wavenc.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> LGTM

Pushed, thanks for review.

Regards,
Tobias
diff mbox

Patch

diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
index 7f3059e..adb20cb 100644
--- a/libavformat/wavenc.c
+++ b/libavformat/wavenc.c
@@ -331,7 +331,7 @@  static int wav_write_header(AVFormatContext *s)
         ffio_fill(pb, 0, 28);
     }
 
-    if (wav->write_peak != 2) {
+    if (wav->write_peak != PEAK_ONLY) {
         /* format header */
         fmt = ff_start_tag(pb, "fmt ");
         if (ff_put_wav_header(s, pb, s->streams[0]->codecpar, 0) < 0) {
@@ -363,7 +363,7 @@  static int wav_write_header(AVFormatContext *s)
     wav->maxpts = wav->last_duration = 0;
     wav->minpts = INT64_MAX;
 
-    if (wav->write_peak != 2) {
+    if (wav->write_peak != PEAK_ONLY) {
         /* info header */
         ff_riff_write_info(s);
 
@@ -381,7 +381,7 @@  static int wav_write_packet(AVFormatContext *s, AVPacket *pkt)
     AVIOContext *pb  = s->pb;
     WAVMuxContext    *wav = s->priv_data;
 
-    if (wav->write_peak != 2)
+    if (wav->write_peak != PEAK_ONLY)
         avio_write(pb, pkt->data, pkt->size);
 
     if (wav->write_peak) {
@@ -426,7 +426,7 @@  static int wav_write_trailer(AVFormatContext *s)
     avio_flush(pb);
 
     if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) {
-        if (wav->write_peak != 2 && avio_tell(pb) - wav->data < UINT32_MAX) {
+        if (wav->write_peak != PEAK_ONLY && avio_tell(pb) - wav->data < UINT32_MAX) {
             ff_end_tag(pb, wav->data);
             avio_flush(pb);
         }