[FFmpeg-devel,07/10] avformat/asfdec_o: Remove code duplication

Submitted by Andreas Rheinhardt on Sept. 18, 2019, 3:26 a.m.

Details

Message ID 20190918032607.11774-7-andreas.rheinhardt@gmail.com
State New
Headers show

Commit Message

Andreas Rheinhardt Sept. 18, 2019, 3:26 a.m.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/asfdec_o.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index e90820373e..40641b8022 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.c
@@ -1549,14 +1549,7 @@  static void reset_packet_state(AVFormatContext *s)
     asf->sub_dts           = 0;
     for (i = 0; i < asf->nb_streams; i++) {
         ASFPacket *pkt = &asf->asf_st[i]->pkt;
-        pkt->size_left = 0;
-        pkt->data_size = 0;
-        pkt->duration  = 0;
-        pkt->flags     = 0;
-        pkt->dts       = 0;
-        pkt->duration  = 0;
-        av_packet_unref(&pkt->avpkt);
-        av_init_packet(&pkt->avpkt);
+        reset_packet(pkt);
     }
 }